Extract API, migrations and portable NAS deployment
This commit is contained in:
commit
673255fa4f
57 files changed
+3799
No files matched your search
@@ -0,0 +1,21 @@
|
||||
ALTER TABLE deliveries ADD COLUMN IF NOT EXISTS updated_at VARCHAR(24) NULL;
|
||||
ALTER TABLE deliveries ADD COLUMN IF NOT EXISTS cancelled_at VARCHAR(24) NULL;
|
||||
ALTER TABLE deliveries ADD COLUMN IF NOT EXISTS cancellation_reason VARCHAR(300) NULL;
|
||||
CREATE TABLE IF NOT EXISTS app_users (
|
||||
id CHAR(36) CHARACTER SET ascii COLLATE ascii_bin PRIMARY KEY,
|
||||
username VARCHAR(80) CHARACTER SET ascii COLLATE ascii_bin NOT NULL UNIQUE,
|
||||
display_name VARCHAR(80) NOT NULL,
|
||||
password_hash VARCHAR(256) NOT NULL,
|
||||
role VARCHAR(20) NOT NULL DEFAULT 'staff',
|
||||
active BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
created_at VARCHAR(24) NOT NULL
|
||||
);
|
||||
CREATE TABLE IF NOT EXISTS auth_sessions (
|
||||
token_hash CHAR(64) CHARACTER SET ascii COLLATE ascii_bin PRIMARY KEY,
|
||||
user_id CHAR(36) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
||||
expires_at DATETIME(3) NOT NULL,
|
||||
FOREIGN KEY (user_id) REFERENCES app_users(id),
|
||||
INDEX sessions_user (user_id),
|
||||
INDEX sessions_expiry (expires_at)
|
||||
);
|
||||
ALTER TABLE sync_operations ADD COLUMN IF NOT EXISTS actor_user_id CHAR(36) CHARACTER SET ascii COLLATE ascii_bin NULL;
|
||||
Reference in new issue
Block a user