You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
431 B
MySQL
12 lines
431 B
MySQL
7 years ago
|
CREATE TABLE `filestore` (
|
||
|
`file_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||
|
`user_id` int(10) NOT NULL,
|
||
|
`filename` varchar(128) NOT NULL,
|
||
|
`mtime` int(10) NOT NULL,
|
||
|
`data` longtext NOT NULL,
|
||
|
PRIMARY KEY (`file_id`),
|
||
|
CONSTRAINT `user_id_fk_filestore` FOREIGN KEY (`user_id`)
|
||
|
REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||
|
UNIQUE `uniqueness` (`user_id`, `filename`)
|
||
|
);
|