This repository has been archived on 2025-10-08. You can view files and clone it, but cannot push or open issues or pull requests.
miniauthold/pkg/userstore/migrations/1741770848_init.up.sql
kekskurse 66d4312695
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/playwright Pipeline was successful
ci/woodpecker/push/deplyoment Pipeline was successful
test: check pw is hashed and not unique
2025-03-13 16:32:37 +01:00

19 lines
567 B
SQL

-- Write your up sql migration here
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
username TEXT NOT NULL UNIQUE,
password TEXT NOT NULL
);
CREATE TABLE mail (
id INTEGER PRIMARY KEY AUTOINCREMENT,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
mail TEXT NOT NULL UNIQUE,
validationCode TEXT NOT NULL UNIQUE,
isValidated BOOLEAN NOT NULL DEFAULT 0,
isPrimary BOOLEAN NOT NULL DEFAULT 0
)