drop tables after commit

This commit is contained in:
Uwe Steinmann 2018-03-29 14:43:32 +02:00
parent 54ce5a7e16
commit 90762b9e13

View File

@ -1,6 +1,6 @@
BEGIN;
ALTER TABLE `tblDocumentContent` ADD COLUMN `revisiondate` TEXT NOT NULL;
ALTER TABLE `tblDocumentContent` ADD COLUMN `revisiondate` TEXT default NULL;
ALTER TABLE `tblUsers` ADD COLUMN `secret` varchar(50) default NULL;
@ -31,11 +31,11 @@ CREATE TABLE `new_tblWorkflowLog` (
INSERT INTO `new_tblWorkflowLog` (`id`, `workflowdocumentcontent`, `userid`, `transition`, `date`, `comment`) SELECT `a`.`id`, `b`.`id`, `a`.`userid`, `a`.`transition`, `a`.`date`, `a`.`comment` FROM `tblWorkflowLog` `a` LEFT JOIN `new_tblWorkflowDocumentContent` `b` ON `a`.`document`=`b`.`document` AND `a`.`version`=`b`.`version` AND `a`.`workflow`=`b`.`workflow` WHERE `b`.`document` IS NOT NULL;
DROP TABLE `tblWorkflowLog`;
ALTER TABLE `tblWorkflowLog` RENAME TO `old_tblWorkflowLog`;
ALTER TABLE `new_tblWorkflowLog` RENAME TO `tblWorkflowLog`;
DROP TABLE `tblWorkflowDocumentContent`;
ALTER TABLE `tblWorkflowDocumentContent` RENAME TO `old_tblWorkflowDocumentContent`;
ALTER TABLE `new_tblWorkflowDocumentContent` RENAME TO `tblWorkflowDocumentContent`;
@ -154,8 +154,6 @@ ALTER TABLE tblUsers RENAME TO old_tblUsers;
ALTER TABLE new_tblUsers RENAME TO tblUsers;
DROP TABLE old_tblUsers;
CREATE TABLE `tblAros` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
`parent` INTEGER,
@ -205,3 +203,9 @@ CREATE TABLE `tblSchedulerTask` (
UPDATE tblVersion set major=6, minor=0, subminor=0;
COMMIT;
DROP TABLE `old_tblUsers`;
DROP TABLE `old_tblWorkflowLog`;
DROP TABLE `old_tblWorkflowDocumentContent`;