Retroactively fix some SQL schema problems

I originally wasn't going to do passwords, but after struggling with
webauthn I decided I'd just go for it. It simplifies the code a lot if I
assert that I always have a password, displayname, etc.
This commit is contained in:
Eli Ribble 2025-11-05 17:36:32 +00:00
parent 981f043b7f
commit 4d55a391c9
No known key found for this signature in database
12 changed files with 179 additions and 243 deletions

View file

@ -1,5 +1,5 @@
-- +goose Up
CREATE TYPE arcgis_license_type AS ENUM (
CREATE TYPE ArcgisLicenseType AS ENUM (
'advancedUT',
'basicUT',
'creatorUT',
@ -23,11 +23,11 @@ CREATE TABLE organization (
CREATE TABLE user_ (
id SERIAL PRIMARY KEY,
arcgis_access_token TEXT,
arcgis_license arcgis_license_type,
arcgis_license ArcgisLicenseType,
arcgis_refresh_token TEXT,
arcgis_refresh_token_expires TIMESTAMP,
arcgis_role TEXT,
display_name VARCHAR(200),
display_name VARCHAR(200) NOT NULL,
email TEXT,
organization_id INTEGER REFERENCES organization (id),
username TEXT NOT NULL