Файл: install/db_tables/gallery.sql
Строк: 25
CREATE TABLE `gallery` (
`id` int(11) NOT NULL auto_increment,
`id_user` int(11) NOT NULL,
`name` varchar(32) NOT NULL,
`time_create`
int(11) NOT NULL,
`time` int(11) NOT NULL,
`opis` varchar(256) NOT
NULL,
PRIMARY KEY (`id`),
KEY `id_user` (`id_user`)
) ENGINE=MyISAM
DEFAULT CHARSET=utf8;
CREATE TABLE `gallery_rating` (
`id_foto` int(11)
NOT NULL,
`id_user` int(11) NOT NULL,
KEY `id_foto`
(`id_foto`,`id_user`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE
`gallery_foto` (
`id` int(11) NOT NULL auto_increment,
`id_gallery`
int(11) NOT NULL,
`id_user` int(11) NOT NULL,
`name` varchar(64) NOT
NULL,
`ras` varchar(4) NOT NULL,
`type` varchar(64) NOT NULL,
`opis`
varchar(10024) NOT NULL,
`rating` int(11) NOT NULL default '0',
PRIMARY
KEY (`id`),
KEY `id_gallery` (`id_gallery`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8;
CREATE TABLE `gallery_komm` (
`id` int(11) NOT NULL
auto_increment,
`id_foto` int(11) NOT NULL,
`id_user` int(11) NOT
NULL,
`time` int(11) NOT NULL,
`msg` varchar(10024) NOT NULL,
PRIMARY
KEY (`id`),
KEY `id_foto` (`id_foto`)
) ENGINE=MyISAM DEFAULT
CHARSET=utf8;