Skip to content

Commit

Permalink
refactor(sql): works for upgrading from QB in addition to fresh installs
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason committed Mar 19, 2024
1 parent 22d7d42 commit ec9527b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion qbx_core.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ CREATE TABLE IF NOT EXISTS `players` (
`metadata` text NOT NULL,
`inventory` longtext DEFAULT NULL,
`phone_number` VARCHAR(20) DEFAULT NULL,
`last_logged_out` timestamp NULL DEFAULT NULL,
`last_updated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`citizenid`),
KEY `id` (`id`),
KEY `last_updated` (`last_updated`),
KEY `license` (`license`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

ALTER TABLE `players`
ADD `last_logged_out` timestamp NULL DEFAULT NULL AFTER `last_updated`,
ALTER COLUMN `citizenid` varchar(50) NOT NULL COLLATE utf8mb4_unicode_ci;

CREATE TABLE IF NOT EXISTS `bans` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) DEFAULT NULL,
Expand Down

0 comments on commit ec9527b

Please sign in to comment.