Browse Source

Make the schema non migration

master
Drew Short 6 years ago
parent
commit
239349fccf
  1. 10
      schema.sql

10
schema.sql

@ -1,4 +1,5 @@
CREATE TABLE IF NOT EXISTS registration_codes (
CREATE TABLE IF NOT EXISTS registration_codes
(
code VARCHAR(60) NOT NULL UNIQUE, code VARCHAR(60) NOT NULL UNIQUE,
creationTime TIMESTAMP NOT NULL, creationTime TIMESTAMP NOT NULL,
expirationTime TIMESTAMP, expirationTime TIMESTAMP,
@ -6,11 +7,10 @@ CREATE TABLE IF NOT EXISTS registration_codes (
maxUsages Integer NOT NULL DEFAULT 1 maxUsages Integer NOT NULL DEFAULT 1
); );
CREATE TABLE IF NOT EXISTS registered_users (
CREATE TABLE IF NOT EXISTS registered_users
(
registrationCode VARCHAR(60) NOT NULL UNIQUE, registrationCode VARCHAR(60) NOT NULL UNIQUE,
username VARCHAR(30) NOT NULL UNIQUE, username VARCHAR(30) NOT NULL UNIQUE,
registeredUserId VARCHAR(60) NOT NULL UNIQUE,
registeredTime TIMESTAMP NOT NULL registeredTime TIMESTAMP NOT NULL
); );
ALTER TABLE registered_users
ADD COLUMN registeredUserId VARCHAR(60);
Loading…
Cancel
Save