mirror of
https://github.com/Alamantus/Lexiconga.git
synced 2025-06-18 15:16:40 +02:00
Add use_ipa and use int for dates in structure.sql
This commit is contained in:
parent
3fac354f5d
commit
9be58f5e72
1 changed files with 14 additions and 17 deletions
|
@ -4,7 +4,7 @@ SET time_zone = "+00:00";
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||||
/*!40101 SET NAMES utf8 */;
|
/*!40101 SET NAMES utf8mb4 */;
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `dictionaries` (
|
CREATE TABLE IF NOT EXISTS `dictionaries` (
|
||||||
|
@ -21,15 +21,13 @@ CREATE TABLE IF NOT EXISTS `dictionaries` (
|
||||||
`last_updated` int(11) DEFAULT NULL,
|
`last_updated` int(11) DEFAULT NULL,
|
||||||
`created_on` int(11) NOT NULL,
|
`created_on` int(11) NOT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=352 ;
|
) ENGINE=MyISAM AUTO_INCREMENT=421 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
DROP TRIGGER IF EXISTS `delete_dictionary_parts`;
|
DELIMITER $$
|
||||||
DELIMITER //
|
CREATE TRIGGER `delete_dictionary_parts` AFTER DELETE ON `dictionaries` FOR EACH ROW BEGIN
|
||||||
CREATE TRIGGER `delete_dictionary_parts` AFTER DELETE ON `dictionaries`
|
|
||||||
FOR EACH ROW BEGIN
|
|
||||||
DELETE FROM words WHERE words.dictionary=old.id;
|
DELETE FROM words WHERE words.dictionary=old.id;
|
||||||
DELETE FROM dictionary_linguistics WHERE dictionary_linguistics.dictionary=old.id;
|
DELETE FROM dictionary_linguistics WHERE dictionary_linguistics.dictionary=old.id;
|
||||||
END
|
END
|
||||||
//
|
$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `dictionary_linguistics` (
|
CREATE TABLE IF NOT EXISTS `dictionary_linguistics` (
|
||||||
|
@ -47,7 +45,7 @@ CREATE TABLE IF NOT EXISTS `memberships` (
|
||||||
`start_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`start_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
`expire_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`expire_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `users` (
|
CREATE TABLE IF NOT EXISTS `users` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
@ -58,19 +56,18 @@ CREATE TABLE IF NOT EXISTS `users` (
|
||||||
`username` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
`username` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
`current_dictionary` int(11) DEFAULT NULL,
|
`current_dictionary` int(11) DEFAULT NULL,
|
||||||
`allow_email` tinyint(1) NOT NULL DEFAULT '1',
|
`allow_email` tinyint(1) NOT NULL DEFAULT '1',
|
||||||
`last_login` timestamp NULL DEFAULT NULL,
|
`use_ipa` tinyint(1) NOT NULL DEFAULT '1',
|
||||||
|
`last_login` int(11) DEFAULT NULL,
|
||||||
`password_reset_code` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
|
`password_reset_code` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
`password_reset_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`password_reset_date` int(11) DEFAULT NULL,
|
||||||
`created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`created_on` int(11) NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `email` (`email`),
|
UNIQUE KEY `email` (`email`),
|
||||||
UNIQUE KEY `username` (`username`)
|
UNIQUE KEY `username` (`username`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=152 ;
|
) ENGINE=MyISAM AUTO_INCREMENT=183 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
DROP TRIGGER IF EXISTS `Delete_User_Dictionaries`;
|
DELIMITER $$
|
||||||
DELIMITER //
|
CREATE TRIGGER `Delete_User_Dictionaries` AFTER DELETE ON `users` FOR EACH ROW DELETE FROM dictionaries WHERE dictionaries.user = old.id
|
||||||
CREATE TRIGGER `Delete_User_Dictionaries` AFTER DELETE ON `users`
|
$$
|
||||||
FOR EACH ROW DELETE FROM dictionaries WHERE dictionaries.user = old.id
|
|
||||||
//
|
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `words` (
|
CREATE TABLE IF NOT EXISTS `words` (
|
||||||
|
|
Loading…
Add table
Reference in a new issue