mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-27 14:51:18 +00:00
be1389420b
* SQL format checking, 1. * SQL format checking, 2. * SQL format checking, 3. * SQL format checking, 4. * SQL format checking, 5. * Running pg_format * Getting rid of comment. * Upping pg_format version. * Using git ls-files for sql format check. * Fixing sql lints. * Addressing PR comments.
26 lines
832 B
SQL
26 lines
832 B
SQL
-- Add columns to site table
|
|
ALTER TABLE site
|
|
ADD COLUMN require_application boolean NOT NULL DEFAULT FALSE;
|
|
|
|
ALTER TABLE site
|
|
ADD COLUMN application_question text;
|
|
|
|
ALTER TABLE site
|
|
ADD COLUMN private_instance boolean NOT NULL DEFAULT FALSE;
|
|
|
|
-- Add pending to local_user
|
|
ALTER TABLE local_user
|
|
ADD COLUMN accepted_application boolean NOT NULL DEFAULT FALSE;
|
|
|
|
CREATE TABLE registration_application (
|
|
id serial PRIMARY KEY,
|
|
local_user_id int REFERENCES local_user ON UPDATE CASCADE ON DELETE CASCADE NOT NULL,
|
|
answer text NOT NULL,
|
|
admin_id int REFERENCES person ON UPDATE CASCADE ON DELETE CASCADE,
|
|
deny_reason text,
|
|
published timestamp NOT NULL DEFAULT now(),
|
|
UNIQUE (local_user_id)
|
|
);
|
|
|
|
CREATE INDEX idx_registration_application_published ON registration_application (published DESC);
|
|
|