2018-08-15 07:02:57 +00:00
|
|
|
CREATE TABLE "users" (
|
2017-07-12 11:05:18 +00:00
|
|
|
`uid` serial not null,
|
|
|
|
`name` varchar (100) not null,
|
|
|
|
`password` varchar (100) not null,
|
|
|
|
`salt` varchar (80) DEFAULT '' not null,
|
|
|
|
`group` int not null,
|
|
|
|
`active` boolean DEFAULT 0 not null,
|
|
|
|
`is_super_admin` boolean DEFAULT 0 not null,
|
|
|
|
`createdAt` timestamp not null,
|
|
|
|
`lastActiveAt` timestamp not null,
|
|
|
|
`session` varchar (200) DEFAULT '' not null,
|
|
|
|
`last_ip` varchar (200) DEFAULT '0.0.0.0.0' not null,
|
|
|
|
`email` varchar (200) DEFAULT '' not null,
|
|
|
|
`avatar` varchar (100) DEFAULT '' not null,
|
|
|
|
`message` text DEFAULT '' not null,
|
|
|
|
`url_prefix` varchar (20) DEFAULT '' not null,
|
|
|
|
`url_name` varchar (100) DEFAULT '' not null,
|
|
|
|
`level` smallint DEFAULT 0 not null,
|
|
|
|
`score` int DEFAULT 0 not null,
|
|
|
|
`posts` int DEFAULT 0 not null,
|
|
|
|
`bigposts` int DEFAULT 0 not null,
|
|
|
|
`megaposts` int DEFAULT 0 not null,
|
|
|
|
`topics` int DEFAULT 0 not null,
|
2018-03-31 05:25:27 +00:00
|
|
|
`liked` int DEFAULT 0 not null,
|
|
|
|
`oldestItemLikedCreatedAt` timestamp not null,
|
|
|
|
`lastLiked` timestamp not null,
|
2017-08-27 09:33:45 +00:00
|
|
|
`temp_group` int DEFAULT 0 not null,
|
2017-07-12 11:05:18 +00:00
|
|
|
primary key(`uid`),
|
|
|
|
unique(`name`)
|
|
|
|
);
|