Made cryptography and entity modules

Coupling was rising so it just makes sense
This commit is contained in:
2024-05-05 18:38:21 +03:00
parent 9af37f78b2
commit 5871943c01
23 changed files with 151 additions and 175 deletions

View File

@ -0,0 +1,3 @@
DROP TABLE account;
DROP TABLE master_pass;

View File

@ -0,0 +1,16 @@
CREATE TABLE
master_pass (
user_id BIGINT UNSIGNED NOT NULL PRIMARY KEY,
salt BINARY(64) NOT NULL,
password_hash BINARY(64) NOT NULL
);
CREATE TABLE
account (
user_id BIGINT UNSIGNED NOT NULL,
name VARCHAR(255) NOT NULL,
salt BINARY(64) NOT NULL,
enc_login VARBINARY(256) NOT NULL,
enc_password VARBINARY(256) NOT NULL,
PRIMARY KEY (user_id, name)
);

View File

@ -0,0 +1,3 @@
-- Add down migration script here
ALTER TABLE master_pass
DROP COLUMN locale;

View File

@ -0,0 +1,3 @@
-- Add up migration script here
ALTER TABLE master_pass
ADD COLUMN locale SMALLINT UNSIGNED NOT NULL DEFAULT 1;