pictures table
This commit is contained in:
14
files/db/update_v2_to_v3.sql
Normal file
14
files/db/update_v2_to_v3.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
CREATE TABLE `pictures` (
|
||||
`id_picture` int(10) UNSIGNED auto_increment,
|
||||
`id_project` int(10) UNSIGNED,
|
||||
`filename` VARCHAR(100) NOT NULL,
|
||||
`taken_on` DATETIME,
|
||||
`timestamp` DATETIME,
|
||||
`rotate` SMALLINT,
|
||||
`led` TIMESTAMP NOT NULL ON UPDATE CURRENT_TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id_picture`),
|
||||
UNIQUE KEY `uni_file_name` (`filename`)
|
||||
);
|
||||
|
||||
ALTER TABLE pictures ADD INDEX(`id_project`);
|
||||
ALTER TABLE pictures ADD FOREIGN KEY (`id_project`) REFERENCES projects(`id_project`);
|
||||
Reference in New Issue
Block a user