gosora/schema/mysql/query_users.sql
Azareal 0dede6a329 NoEmbeds privacy and config settings.
Phase out url_prefix and url_name.
Eliminate some boilerplate and allocations while we're at it.
Reduce the number of conditional statements in url validator loops.
Better parsing of Site.URL to handle user error better.

You will have to run the patcher / updater for this commit.
2019-12-08 13:40:56 +10:00

31 lines
1.1 KiB
SQL

CREATE TABLE `users` (
`uid` int not null AUTO_INCREMENT,
`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` datetime not null,
`lastActiveAt` datetime not null,
`session` varchar(200) DEFAULT '' not null,
`last_ip` varchar(200) DEFAULT '0.0.0.0.0' not null,
`enable_embeds` int DEFAULT -1 not null,
`email` varchar(200) DEFAULT '' not null,
`avatar` varchar(100) DEFAULT '' not null,
`message` text 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,
`liked` int DEFAULT 0 not null,
`oldestItemLikedCreatedAt` datetime not null,
`lastLiked` datetime not null,
`temp_group` int DEFAULT 0 not null,
primary key(`uid`),
unique(`name`)
) CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;