Don't forget to commit the rebuilt queries - #3

This commit is contained in:
Azareal 2018-10-07 11:24:53 +10:00
parent ebbfa7d247
commit b6220d03d3
15 changed files with 19 additions and 19 deletions

View File

@ -1,7 +1,7 @@
CREATE TABLE [menu_items] ( CREATE TABLE [menu_items] (
[miid] int not null IDENTITY, [miid] int not null IDENTITY,
[mid] int not null, [mid] int not null,
[name] nvarchar (200) not null, [name] nvarchar (200) DEFAULT '' not null,
[htmlID] nvarchar (200) DEFAULT '' not null, [htmlID] nvarchar (200) DEFAULT '' not null,
[cssClass] nvarchar (200) DEFAULT '' not null, [cssClass] nvarchar (200) DEFAULT '' not null,
[position] nvarchar (100) not null, [position] nvarchar (100) not null,

View File

@ -5,8 +5,8 @@ CREATE TABLE [users_replies] (
[parsed_content] nvarchar (MAX) not null, [parsed_content] nvarchar (MAX) not null,
[createdAt] datetime not null, [createdAt] datetime not null,
[createdBy] int not null, [createdBy] int not null,
[lastEdit] int not null, [lastEdit] int DEFAULT 0 not null,
[lastEditBy] int not null, [lastEditBy] int DEFAULT 0 not null,
[ipaddress] nvarchar (200) DEFAULT '0.0.0.0.0' not null, [ipaddress] nvarchar (200) DEFAULT '0.0.0.0.0' not null,
primary key([rid]) primary key([rid])
); );

View File

@ -3,6 +3,6 @@ CREATE TABLE `likes` (
`targetItem` int not null, `targetItem` int not null,
`targetType` varchar(50) DEFAULT 'replies' not null, `targetType` varchar(50) DEFAULT 'replies' not null,
`sentBy` int not null, `sentBy` int not null,
`createdAt` datetime not null, `createdAt` datetime DEFAULT UTC_TIMESTAMP() not null,
`recalc` tinyint DEFAULT 0 not null `recalc` tinyint DEFAULT 0 not null
); );

View File

@ -1,7 +1,7 @@
CREATE TABLE `menu_items` ( CREATE TABLE `menu_items` (
`miid` int not null AUTO_INCREMENT, `miid` int not null AUTO_INCREMENT,
`mid` int not null, `mid` int not null,
`name` varchar(200) not null, `name` varchar(200) DEFAULT '' not null,
`htmlID` varchar(200) DEFAULT '' not null, `htmlID` varchar(200) DEFAULT '' not null,
`cssClass` varchar(200) DEFAULT '' not null, `cssClass` varchar(200) DEFAULT '' not null,
`position` varchar(100) not null, `position` varchar(100) not null,

View File

@ -2,6 +2,6 @@ CREATE TABLE `polls_votes` (
`pollID` int not null, `pollID` int not null,
`uid` int not null, `uid` int not null,
`option` int DEFAULT 0 not null, `option` int DEFAULT 0 not null,
`castAt` datetime not null, `castAt` datetime DEFAULT UTC_TIMESTAMP() not null,
`ipaddress` varchar(200) DEFAULT '0.0.0.0.0' not null `ipaddress` varchar(200) DEFAULT '0.0.0.0.0' not null
) CHARSET=utf8mb4 COLLATE utf8mb4_general_ci; ) CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;

View File

@ -5,6 +5,6 @@ CREATE TABLE `registration_logs` (
`failureReason` varchar(100) not null, `failureReason` varchar(100) not null,
`success` bool DEFAULT 0 not null, `success` bool DEFAULT 0 not null,
`ipaddress` varchar(200) not null, `ipaddress` varchar(200) not null,
`doneAt` datetime not null, `doneAt` datetime DEFAULT UTC_TIMESTAMP() not null,
primary key(`rlid`) primary key(`rlid`)
); );

View File

@ -3,7 +3,7 @@ CREATE TABLE `replies` (
`tid` int not null, `tid` int not null,
`content` text not null, `content` text not null,
`parsed_content` text not null, `parsed_content` text not null,
`createdAt` datetime not null, `createdAt` datetime DEFAULT UTC_TIMESTAMP() not null,
`createdBy` int not null, `createdBy` int not null,
`lastEdit` int DEFAULT 0 not null, `lastEdit` int DEFAULT 0 not null,
`lastEditBy` int DEFAULT 0 not null, `lastEditBy` int DEFAULT 0 not null,

View File

@ -3,6 +3,6 @@ CREATE TABLE `revisions` (
`content` text not null, `content` text not null,
`contentID` int not null, `contentID` int not null,
`contentType` varchar(100) DEFAULT 'replies' not null, `contentType` varchar(100) DEFAULT 'replies' not null,
`createdAt` datetime not null, `createdAt` datetime DEFAULT UTC_TIMESTAMP() not null,
primary key(`reviseID`) primary key(`reviseID`)
) CHARSET=utf8mb4 COLLATE utf8mb4_general_ci; ) CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;

View File

@ -3,7 +3,7 @@ CREATE TABLE `topics` (
`title` varchar(100) not null, `title` varchar(100) not null,
`content` text not null, `content` text not null,
`parsed_content` text not null, `parsed_content` text not null,
`createdAt` datetime not null, `createdAt` datetime DEFAULT UTC_TIMESTAMP() not null,
`lastReplyAt` datetime not null, `lastReplyAt` datetime not null,
`lastReplyBy` int not null, `lastReplyBy` int not null,
`createdBy` int not null, `createdBy` int not null,

View File

@ -6,7 +6,7 @@ CREATE TABLE `users` (
`group` int not null, `group` int not null,
`active` boolean DEFAULT 0 not null, `active` boolean DEFAULT 0 not null,
`is_super_admin` boolean DEFAULT 0 not null, `is_super_admin` boolean DEFAULT 0 not null,
`createdAt` datetime not null, `createdAt` datetime DEFAULT UTC_TIMESTAMP() not null,
`lastActiveAt` datetime not null, `lastActiveAt` datetime not null,
`session` varchar(200) DEFAULT '' not null, `session` varchar(200) DEFAULT '' not null,
`last_ip` varchar(200) DEFAULT '0.0.0.0.0' not null, `last_ip` varchar(200) DEFAULT '0.0.0.0.0' not null,

View File

@ -9,6 +9,6 @@ CREATE TABLE `users_2fa_keys` (
`scratch6` varchar(50) not null, `scratch6` varchar(50) not null,
`scratch7` varchar(50) not null, `scratch7` varchar(50) not null,
`scratch8` varchar(50) not null, `scratch8` varchar(50) not null,
`createdAt` datetime not null, `createdAt` datetime DEFAULT UTC_TIMESTAMP() not null,
primary key(`uid`) primary key(`uid`)
) CHARSET=utf8mb4 COLLATE utf8mb4_general_ci; ) CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;

View File

@ -2,7 +2,7 @@ CREATE TABLE `users_groups_scheduler` (
`uid` int not null, `uid` int not null,
`set_group` int not null, `set_group` int not null,
`issued_by` int not null, `issued_by` int not null,
`issued_at` datetime not null, `issued_at` datetime DEFAULT UTC_TIMESTAMP() not null,
`revert_at` datetime not null, `revert_at` datetime not null,
`temporary` boolean not null, `temporary` boolean not null,
primary key(`uid`) primary key(`uid`)

View File

@ -3,10 +3,10 @@ CREATE TABLE `users_replies` (
`uid` int not null, `uid` int not null,
`content` text not null, `content` text not null,
`parsed_content` text not null, `parsed_content` text not null,
`createdAt` datetime not null, `createdAt` datetime DEFAULT UTC_TIMESTAMP() not null,
`createdBy` int not null, `createdBy` int not null,
`lastEdit` int not null, `lastEdit` int DEFAULT 0 not null,
`lastEditBy` int not null, `lastEditBy` int DEFAULT 0 not null,
`ipaddress` varchar(200) DEFAULT '0.0.0.0.0' not null, `ipaddress` varchar(200) DEFAULT '0.0.0.0.0' not null,
primary key(`rid`) primary key(`rid`)
) CHARSET=utf8mb4 COLLATE utf8mb4_general_ci; ) CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;

View File

@ -1,7 +1,7 @@
CREATE TABLE "menu_items" ( CREATE TABLE "menu_items" (
`miid` serial not null, `miid` serial not null,
`mid` int not null, `mid` int not null,
`name` varchar (200) not null, `name` varchar (200) DEFAULT '' not null,
`htmlID` varchar (200) DEFAULT '' not null, `htmlID` varchar (200) DEFAULT '' not null,
`cssClass` varchar (200) DEFAULT '' not null, `cssClass` varchar (200) DEFAULT '' not null,
`position` varchar (100) not null, `position` varchar (100) not null,

View File

@ -5,8 +5,8 @@ CREATE TABLE "users_replies" (
`parsed_content` text not null, `parsed_content` text not null,
`createdAt` timestamp not null, `createdAt` timestamp not null,
`createdBy` int not null, `createdBy` int not null,
`lastEdit` int not null, `lastEdit` int DEFAULT 0 not null,
`lastEditBy` int not null, `lastEditBy` int DEFAULT 0 not null,
`ipaddress` varchar (200) DEFAULT '0.0.0.0.0' not null, `ipaddress` varchar (200) DEFAULT '0.0.0.0.0' not null,
primary key(`rid`) primary key(`rid`)
); );