I'm trying to see if this speeds up builds a bit. May not without a module boundary, but for now it's nice organization to have as the program grows.
39 lines
799 B
SQL
39 lines
799 B
SQL
-- +goose Up
|
|
CREATE TYPE ArcgisLicenseType AS ENUM (
|
|
'advancedUT',
|
|
'basicUT',
|
|
'creatorUT',
|
|
'editorUT',
|
|
'fieldWorkerUT',
|
|
'GISProfessionalAdvUT',
|
|
'GISProfessionalBasicUT',
|
|
'GISProfessionalStdUT',
|
|
'IndoorsUserUT',
|
|
'insightsAnalystUT',
|
|
'liteUT',
|
|
'standardUT',
|
|
'storytellerUT',
|
|
'viewerUT');
|
|
|
|
CREATE TABLE organization (
|
|
id SERIAL PRIMARY KEY,
|
|
name TEXT
|
|
);
|
|
|
|
CREATE TABLE user_ (
|
|
id SERIAL PRIMARY KEY,
|
|
arcgis_access_token TEXT,
|
|
arcgis_license ArcgisLicenseType,
|
|
arcgis_refresh_token TEXT,
|
|
arcgis_refresh_token_expires TIMESTAMP,
|
|
arcgis_role TEXT,
|
|
display_name VARCHAR(200) NOT NULL,
|
|
email TEXT,
|
|
organization_id INTEGER REFERENCES organization (id),
|
|
username TEXT NOT NULL
|
|
);
|
|
|
|
-- +goose Down
|
|
DROP TABLE user_;
|
|
DROP TABLE organization;
|
|
DROP TYPE arcgis_license_type;
|