added sqldump and sqldrop commands
This commit is contained in:
parent
77b3ded476
commit
0f5ac18479
10 changed files with 102 additions and 215 deletions
22
setup/sql/upgrade-00001.sql
Normal file
22
setup/sql/upgrade-00001.sql
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Header section
|
||||
# Define incrementing schema version number
|
||||
SET @schema_version = '1';
|
||||
|
||||
# Upgrade script section
|
||||
CREATE TABLE `import_failed` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`import` int(11) unsigned NOT NULL,
|
||||
`email` varchar(255) NOT NULL DEFAULT '',
|
||||
`reason` varchar(255) DEFAULT NULL,
|
||||
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `import` (`import`),
|
||||
CONSTRAINT `import_failed_ibfk_1` FOREIGN KEY (`import`) REFERENCES `importer` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
# Footer section
|
||||
LOCK TABLES `settings` WRITE;
|
||||
/*!40000 ALTER TABLE `settings` DISABLE KEYS */;
|
||||
INSERT INTO `settings` (`key`, `value`) VALUES('db_schema_version', @schema_version) ON DUPLICATE KEY UPDATE `value`=@schema_version;
|
||||
/*!40000 ALTER TABLE `settings` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
Loading…
Add table
Add a link
Reference in a new issue