~jae/dn0magik-mc

d5e2d34181f9e2767c0690999613882e9c31c910 — Jae Lo Presti (DN0) 2 years ago 68e73c2
Migrations: update base schema to include auto increment
1 files changed, 2 insertions(+), 2 deletions(-)

M src/migrations/0001-base.py
M src/migrations/0001-base.py => src/migrations/0001-base.py +2 -2
@@ 2,11 2,11 @@ from yoyo import step

steps = [
    step(
        "CREATE TABLE Users (id INT NOT NULL PRIMARY KEY, username VARCHAR(255) NOT NULL, password VARCHAR(255), uuid VARCHAR(255) NOT NULL, registered_on DATETIME NOT NULL)",
        "CREATE TABLE Users (id INTEGER PRIMARY KEY AUTOINCREMENT, username VARCHAR(255) NOT NULL, password VARCHAR(255), uuid VARCHAR(255) NOT NULL, registered_on DATETIME NOT NULL)",
        "DROP TABLE Users",
    ),
    step(
        "CREATE TABLE UsernameHistory (id INT NOT NULL PRIMARY KEY, username VARCHAR(255) NOT NULL, changed_on DATETIME NOT NULL, uuid VARCHAR(255) NOT NULL, CONSTRAINT fk_uui FOREIGN KEY (uuid) REFERENCES Users(uuid))",
        "CREATE TABLE UsernameHistory (id INTEGER PRIMARY KEY AUTOINCREMENT, username VARCHAR(255) NOT NULL, changed_on DATETIME NOT NULL, uuid VARCHAR(255) NOT NULL, CONSTRAINT fk_uui FOREIGN KEY (uuid) REFERENCES Users(uuid))",
        "DROP TABLE UsernameHistory",
    ),
]