mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
fix updating tblDocumentFiles
This commit is contained in:
parent
51c342b5e3
commit
c1e794dc4f
|
@ -51,7 +51,9 @@ ALTER TABLE `new_tblDocumentContent` RENAME TO `tblDocumentContent`;
|
||||||
CREATE TABLE `new_tblDocumentFiles` (
|
CREATE TABLE `new_tblDocumentFiles` (
|
||||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
|
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
`document` INTEGER NOT NULL default 0 REFERENCES `tblDocuments` (`id`),
|
`document` INTEGER NOT NULL default 0 REFERENCES `tblDocuments` (`id`),
|
||||||
|
`version` INTEGER unsigned NOT NULL default '0',
|
||||||
`userID` INTEGER NOT NULL default 0 REFERENCES `tblUsers` (`id`),
|
`userID` INTEGER NOT NULL default 0 REFERENCES `tblUsers` (`id`),
|
||||||
|
`public` INTEGER NOT NULL default '0',
|
||||||
`comment` text,
|
`comment` text,
|
||||||
`name` varchar(150) default NULL,
|
`name` varchar(150) default NULL,
|
||||||
`date` INTEGER default NULL,
|
`date` INTEGER default NULL,
|
||||||
|
@ -61,16 +63,12 @@ CREATE TABLE `new_tblDocumentFiles` (
|
||||||
`mimeType` varchar(100) NOT NULL default ''
|
`mimeType` varchar(100) NOT NULL default ''
|
||||||
) ;
|
) ;
|
||||||
|
|
||||||
INSERT INTO `new_tblDocumentFiles` SELECT * FROM `tblDocumentFiles`;
|
INSERT INTO `new_tblDocumentFiles` SELECT `id`, `document`, 0, `userID`, 0, `comment`, `name`, `date`, `dir`, `orgFileName`, `fileType`, `mimeType` FROM `tblDocumentFiles`;
|
||||||
|
|
||||||
DROP TABLE `tblDocumentFiles`;
|
DROP TABLE `tblDocumentFiles`;
|
||||||
|
|
||||||
ALTER TABLE `new_tblDocumentFiles` RENAME TO `tblDocumentFiles`;
|
ALTER TABLE `new_tblDocumentFiles` RENAME TO `tblDocumentFiles`;
|
||||||
|
|
||||||
ALTER TABLE `tblDocumentFiles` ADD COLUMN `version` INTEGER unsigned NOT NULL DEFAULT '0';
|
|
||||||
|
|
||||||
ALTER TABLE `tblDocumentFiles` ADD COLUMN `public` INTEGER unsigned NOT NULL DEFAULT '0';
|
|
||||||
|
|
||||||
CREATE TABLE `new_tblUsers` (
|
CREATE TABLE `new_tblUsers` (
|
||||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
|
`id` INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
`login` varchar(50) default NULL,
|
`login` varchar(50) default NULL,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user