From abbb2450772fc4813268ea5482d8805c42e5bc98 Mon Sep 17 00:00:00 2001
From: Syndamia <kamen@syndamia.com>
Date: Sat, 18 Jan 2025 20:40:37 +0200
Subject: feat(migrations): Add anonymous user

---
 migrations/initial.sql | 45 ---------------------------------------------
 1 file changed, 45 deletions(-)
 delete mode 100644 migrations/initial.sql

(limited to 'migrations/initial.sql')

diff --git a/migrations/initial.sql b/migrations/initial.sql
deleted file mode 100644
index 8ac5ac0..0000000
--- a/migrations/initial.sql
+++ /dev/null
@@ -1,45 +0,0 @@
-CREATE DATABASE IF NOT EXISTS nwfh;
-USE nwfh;
-
-CREATE TABLE IF NOT EXISTS Users (
-    UID      INT                   NOT NULL AUTO_INCREMENT,
-    Username VARCHAR(50)           NOT NULL UNIQUE,
-    Password VARCHAR(50)           NOT NULL,
-    Role     ENUM('User', 'Admin') NOT NULL,
-    PRIMARY KEY (UID)
-);
-
-CREATE TABLE IF NOT EXISTS Cookies (
-    UID     INT NOT NULL AUTO_INCREMENT,
-    Token   CHAR(32) NOT NULL,
-    Expires DATETIME,
-    PRIMARY KEY (UID, Token),
-    FOREIGN KEY (UID) REFERENCES Users(UID)
-);
-
-CREATE TABLE IF NOT EXISTS Webpage (
-    WID          INT          NOT NULL AUTO_INCREMENT,
-    Path         VARCHAR(512) NOT NULL UNIQUE,
-    URL          VARCHAR(512) NOT NULL,
-    Date         DATETIME     NOT NULL,
-    Visits       INT          NOT NULL,
-    RequesterUID INT          NOT NULL,
-    PRIMARY KEY (WID),
-    FOREIGN KEY (RequesterUID) REFERENCES Users(UID)
-);
-
-CREATE TABLE IF NOT EXISTS ArchiveLists (
-    LID         INT         NOT NULL AUTO_INCREMENT,
-    AuthorUID   INT         NOT NULL,
-    Name        VARCHAR(64) NOT NULL,
-    Description VARCHAR(255),
-    PRIMARY KEY (LID),
-    FOREIGN KEY (AuthorUID) REFERENCES Users(UID)
-);
-
-CREATE TABLE IF NOT EXISTS ArchiveListsWebpages (
-    WID      INT NOT NULL,
-    LID      INT NOT NULL,
-    Position INT NOT NULL,
-    PRIMARY KEY (WID, LID)
-);
-- 
cgit v1.2.3

