feat(intial auth): intial auth setup for the scanner
Some checks failed
Build and Push LST Docker Image / docker (push) Has been cancelled
Some checks failed
Build and Push LST Docker Image / docker (push) Has been cancelled
This commit is contained in:
14
migrations/0042_melted_talon.sql
Normal file
14
migrations/0042_melted_talon.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
CREATE TYPE "public"."mobile_role" AS ENUM('user', 'lead', 'manager', 'admin');--> statement-breakpoint
|
||||
CREATE TABLE "scan_users" (
|
||||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
||||
"name" text NOT NULL,
|
||||
"scanner_id" integer NOT NULL,
|
||||
"pin_number" integer NOT NULL,
|
||||
"pin_hash" text NOT NULL,
|
||||
"excluded_commands" text DEFAULT '',
|
||||
"role" "mobile_role" DEFAULT 'user' NOT NULL,
|
||||
"active" boolean DEFAULT true,
|
||||
"last_scan" timestamp DEFAULT now(),
|
||||
"add_Date" timestamp DEFAULT now(),
|
||||
"upd_date" timestamp DEFAULT now()
|
||||
);
|
||||
3
migrations/0043_melted_lyja.sql
Normal file
3
migrations/0043_melted_lyja.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE "scan_users" ADD CONSTRAINT "scan_users_scanner_id_unique" UNIQUE("scanner_id");--> statement-breakpoint
|
||||
ALTER TABLE "scan_users" ADD CONSTRAINT "scan_users_pin_number_unique" UNIQUE("pin_number");--> statement-breakpoint
|
||||
ALTER TABLE "scan_users" ADD CONSTRAINT "scan_user_unique" UNIQUE("scanner_id","pin_number");
|
||||
2
migrations/0044_steady_magneto.sql
Normal file
2
migrations/0044_steady_magneto.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE "scan_users" ALTER COLUMN "scanner_id" SET DATA TYPE text;--> statement-breakpoint
|
||||
ALTER TABLE "scan_users" ALTER COLUMN "pin_number" SET DATA TYPE text;
|
||||
2120
migrations/meta/0042_snapshot.json
Normal file
2120
migrations/meta/0042_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
2143
migrations/meta/0043_snapshot.json
Normal file
2143
migrations/meta/0043_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
2143
migrations/meta/0044_snapshot.json
Normal file
2143
migrations/meta/0044_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -295,6 +295,27 @@
|
||||
"when": 1777509638464,
|
||||
"tag": "0041_bright_tempest",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 42,
|
||||
"version": "7",
|
||||
"when": 1777659968051,
|
||||
"tag": "0042_melted_talon",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 43,
|
||||
"version": "7",
|
||||
"when": 1777664911423,
|
||||
"tag": "0043_melted_lyja",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 44,
|
||||
"version": "7",
|
||||
"when": 1777666145468,
|
||||
"tag": "0044_steady_magneto",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user