@ -3,9 +3,13 @@
- - changeset reya : users_table runInTransaction : false
- - changeset reya : users_table runInTransaction : false
CREATE TABLE IF NOT EXISTS users
CREATE TABLE IF NOT EXISTS users
(
(
id UUID NOT NULL PRIMARY KEY DEFAULT gen_random_uuid ( ) ,
id UUID NOT NULL PRIMARY KEY DEFAULT gen_random_uuid ( ) ,
discord_snowflake INT NOT NULL ,
is_admin BOOLEAN NOT NULL DEFAULT FALSE ,
INDEX discord_users ( discord_snowflake )
created_at TIMESTAMPTZ NOT NULL DEFAULT now ( ) ,
updated_at TIMESTAMPTZ NOT NULL DEFAULT now ( ) ,
active_at TIMESTAMPTZ NULL DEFAULT NULL ,
FAMILY essentials ( id , is_admin ) ,
FAMILY timestamps ( created_at , updated_at , active_at )
) ;
) ;
- - rollback DROP TABLE IF EXISTS users ;
- - rollback DROP TABLE IF EXISTS users ;
@ -41,14 +45,15 @@ VALUES (0, 'Basic', '', 0),
( 14 , ' Bully ' , ' ' , 14 ) ,
( 14 , ' Bully ' , ' ' , 14 ) ,
( 15 , ' Mythic ' , ' ' , 15 ) ,
( 15 , ' Mythic ' , ' ' , 15 ) ,
( 16 , ' Toy ' , ' ' , 16 ) ,
( 16 , ' Toy ' , ' ' , 16 ) ,
( 17 , ' Cute ' , ' ' , 17 ) ;
( 17 , ' Cute ' , ' ' , 17 )
ON CONFLICT DO NOTHING ;
- - rollback DELETE FROM types WHERE id in ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 )
- - rollback DELETE FROM types WHERE id in ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 )
- - changeset reya : difficulties_table runInTransaction : false
- - changeset reya : difficulties_table runInTransaction : false
CREATE TABLE IF NOT EXISTS difficulties
CREATE TABLE IF NOT EXISTS difficulties
(
(
id INT NOT NULL PRIMARY KEY ,
id INT NOT NULL PRIMARY KEY ,
name STRING NOT NULL ,
name STRING NOT NULL UNIQUE ,
description STRING NOT NULL ,
description STRING NOT NULL ,
display_order INT NOT NULL ,
display_order INT NOT NULL ,
endo_only BOOLEAN NOT NULL DEFAULT false ,
endo_only BOOLEAN NOT NULL DEFAULT false ,
@ -83,17 +88,15 @@ VALUES (0, 'Endo Only', 'You can never be digested. You always come out sooner o
false , true , 90 , 50 , 90 , true ) ,
false , true , 90 , 50 , 90 , true ) ,
( 6 , ' Extremely Dangerous ' ,
( 6 , ' Extremely Dangerous ' ,
' If you get devoured and you don '' t get out, you '' ll lose just about everything. Be very, very careful... ' , 6 ,
' If you get devoured and you don '' t get out, you '' ll lose just about everything. Be very, very careful... ' , 6 ,
false , true , 100 , 100 , 100 , true ) ,
false , true , 100 , 100 , 100 , true )
( 7 , ' Impossible ' ,
ON CONFLICT DO NOTHING ;
' There is nothing to look forward to after digestion but an eternity on someone else '' s thighs. When you '' re digested, your life is over. There '' s no coming back. Ever. ' ,
7 , false , true , 100 , 100 , 100 , false ) ;
- - rollback DELETE FROM difficulties WHERE id IN ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ) ;
- - rollback DELETE FROM difficulties WHERE id IN ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ) ;
- - changeset reya : preferences_table runInTransaction : false
- - changeset reya : preferences_table runInTransaction : false
CREATE TABLE IF NOT EXISTS preferences
CREATE TABLE IF NOT EXISTS preferences
(
(
id INT NOT NULL PRIMARY KEY ,
id INT NOT NULL PRIMARY KEY ,
name STRING NOT NULL ,
name STRING NOT NULL UNIQUE ,
description STRING NOT NULL ,
description STRING NOT NULL ,
display_order INT NOT NULL ,
display_order INT NOT NULL ,
can_use_vore BOOLEAN NOT NULL ,
can_use_vore BOOLEAN NOT NULL ,
@ -106,7 +109,8 @@ INSERT INTO preferences (id, name, description, display_order, can_use_vore, can
VALUES ( 0 , ' Observer ' , ' You can neither eat nor be eaten. ' , 0 , false , false ) ,
VALUES ( 0 , ' Observer ' , ' You can neither eat nor be eaten. ' , 0 , false , false ) ,
( 1 , ' Prey Only ' , ' You can only be eaten, not eat. ' , 1 , false , true ) ,
( 1 , ' Prey Only ' , ' You can only be eaten, not eat. ' , 1 , false , true ) ,
( 2 , ' Pred Only ' , ' You can only eat, not be eaten. ' , 2 , true , false ) ,
( 2 , ' Pred Only ' , ' You can only eat, not be eaten. ' , 2 , true , false ) ,
( 3 , ' Switch ' , ' You can both eat and be eaten. ' , 3 , true , true ) ;
( 3 , ' Switch ' , ' You can both eat and be eaten. ' , 3 , true , true )
ON CONFLICT DO NOTHING ;
- - rollback DELETE FROM preferences WHERE id IN ( 0 , 1 , 2 , 3 ) ;
- - rollback DELETE FROM preferences WHERE id IN ( 0 , 1 , 2 , 3 ) ;
- - changeset reya : genders_table runInTransaction : false
- - changeset reya : genders_table runInTransaction : false
@ -114,6 +118,7 @@ CREATE TABLE IF NOT EXISTS genders
(
(
id INT NOT NULL PRIMARY KEY ,
id INT NOT NULL PRIMARY KEY ,
name STRING NOT NULL ,
name STRING NOT NULL ,
pronouns STRING NOT NULL UNIQUE ,
display_order INT NOT NULL ,
display_order INT NOT NULL ,
use_plural BOOLEAN NOT NULL ,
use_plural BOOLEAN NOT NULL ,
subjective STRING NOT NULL ,
subjective STRING NOT NULL ,
@ -125,33 +130,36 @@ CREATE TABLE IF NOT EXISTS genders
- - rollback DROP TABLE IF EXISTS genders ;
- - rollback DROP TABLE IF EXISTS genders ;
- - changeset reya : genders_values runInTransaction : true
- - changeset reya : genders_values runInTransaction : true
INSERT INTO genders ( id , name , display_order , use_plural , subjective , adjective , possessive , reflexive , objective )
INSERT INTO genders ( id , name , pronouns , display_order , use_plural , subjective , adjective , possessive , reflexive ,
VALUES ( 0 , ' Non-binary (name only) ' , 0 , false , ' @@ ' , ' @@ '' s ' , ' @@ '' s ' , ' @@ '' s self ' , ' @@ ' ) ,
objective )
( 1 , ' Female (she/her) ' , 1 , false , ' she ' , ' her ' , ' hers ' , ' herself ' , ' her ' ) ,
VALUES ( 0 , ' Non-binary ' , ' name only ' , 0 , false , ' @@ ' , ' @@ '' s ' , ' @@ '' s ' , ' @@ '' s self ' , ' @@ ' ) ,
( 2 , ' Non-binary (they/them) ' , 2 , true , ' they ' , ' their ' , ' theirs ' , ' themself ' , ' them ' ) ,
( 1 , ' Female ' , ' she/her ' , 1 , false , ' she ' , ' her ' , ' hers ' , ' herself ' , ' her ' ) ,
( 3 , ' Male (he/him) ' , 3 , false , ' he ' , ' his ' , ' his ' , ' himself ' , ' him ' ) ,
( 2 , ' Non-binary ' , ' they/them ' , 2 , true , ' they ' , ' their ' , ' theirs ' , ' themself ' , ' them ' ) ,
( 4 , ' Object (it/its) ' , 4 , false , ' it ' , ' its ' , ' its ' , ' itself ' , ' it ' ) ,
( 3 , ' Male ' , ' he/him ' , 3 , false , ' he ' , ' his ' , ' his ' , ' himself ' , ' him ' ) ,
( 5 , ' Herm (shi/hir) ' , 5 , false , ' shi ' , ' hir ' , ' hirs ' , ' hirself ' , ' hir ' ) ,
( 4 , ' Object ' , ' it/its ' , 4 , false , ' it ' , ' its ' , ' its ' , ' itself ' , ' it ' ) ,
( 6 , ' Non-binary (ae/aer) ' , 6 , false , ' ae ' , ' aer ' , ' aers ' , ' aerself ' , ' aer ' ) ,
( 5 , ' Herm ' , ' shi/hir ' , 5 , false , ' shi ' , ' hir ' , ' hirs ' , ' hirself ' , ' hir ' ) ,
( 7 , ' Non-binary (fae/faer) ' , 7 , false , ' fae ' , ' faer ' , ' faers ' , ' faerself ' , ' faer ' ) ,
( 6 , ' Non-binary ' , ' ae/aer ' , 6 , false , ' ae ' , ' aer ' , ' aers ' , ' aerself ' , ' aer ' ) ,
( 8 , ' Non-binary (e/em) ' , 8 , false , ' e ' , ' eir ' , ' eirs ' , ' emself ' , ' em ' ) ,
( 7 , ' Non-binary ' , ' fae/faer ' , 7 , false , ' fae ' , ' faer ' , ' faers ' , ' faerself ' , ' faer ' ) ,
( 9 , ' Non-binary (ey/em) ' , 9 , false , ' ey ' , ' eir ' , ' eirs ' , ' emself ' , ' em ' ) ,
( 8 , ' Non-binary ' , ' e/em ' , 8 , false , ' e ' , ' eir ' , ' eirs ' , ' emself ' , ' em ' ) ,
( 10 , ' Non-binary (per/per) ' , 10 , false , ' per ' , ' pers ' , ' pers ' , ' perself ' , ' per ' ) ,
( 9 , ' Non-binary ' , ' ey/em ' , 9 , false , ' ey ' , ' eir ' , ' eirs ' , ' emself ' , ' em ' ) ,
( 11 , ' Non-binary (ve/ver) ' , 11 , false , ' ve ' , ' vis ' , ' vis ' , ' verself ' , ' ver ' ) ,
( 10 , ' Non-binary ' , ' per/per ' , 10 , false , ' per ' , ' pers ' , ' pers ' , ' perself ' , ' per ' ) ,
( 12 , ' Non-binary (xe/xem) ' , 12 , false , ' xe ' , ' xyr ' , ' xyrs ' , ' xemself ' , ' xem ' ) ,
( 11 , ' Non-binary ' , ' ve/ver ' , 11 , false , ' ve ' , ' vis ' , ' vis ' , ' verself ' , ' ver ' ) ,
( 13 , ' Non-binary (ze/hir) ' , 13 , false , ' ze ' , ' hir ' , ' hirs ' , ' hirself ' , ' hir ' ) ,
( 12 , ' Non-binary ' , ' xe/xem ' , 12 , false , ' xe ' , ' xyr ' , ' xyrs ' , ' xemself ' , ' xem ' ) ,
( 14 , ' Non-binary (zie/hir) ' , 14 , false , ' zie ' , ' hir ' , ' hirs ' , ' hirself ' , ' hir ' ) ,
( 13 , ' Non-binary ' , ' ze/hir ' , 13 , false , ' ze ' , ' hir ' , ' hirs ' , ' hirself ' , ' hir ' ) ,
( 15 , ' Non-binary (zie/zim) ' , 15 , false , ' zie ' , ' zir ' , ' zis ' , ' zieself ' , ' zim ' ) ,
( 14 , ' Non-binary ' , ' zie/hir ' , 14 , false , ' zie ' , ' hir ' , ' hirs ' , ' hirself ' , ' hir ' ) ,
( 16 , ' Non-binary (sie/sie) ' , 16 , false , ' sie ' , ' hir ' , ' hirs ' , ' hirself ' , ' sie ' ) ,
( 15 , ' Non-binary ' , ' zie/zim ' , 15 , false , ' zie ' , ' zir ' , ' zis ' , ' zieself ' , ' zim ' ) ,
( 17 , ' Non-binary (te/ter) ' , 17 , false , ' te ' , ' tem ' , ' ters ' , ' terself ' , ' ter ' ) ;
( 16 , ' Non-binary ' , ' sie/sie ' , 16 , false , ' sie ' , ' hir ' , ' hirs ' , ' hirself ' , ' sie ' ) ,
( 17 , ' Non-binary ' , ' te/ter ' , 17 , false , ' te ' , ' tem ' , ' ters ' , ' terself ' , ' ter ' )
ON CONFLICT DO NOTHING ;
- - rollback DELETE FROM genders WHERE id IN ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 ) ;
- - rollback DELETE FROM genders WHERE id IN ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 ) ;
- - changeset reya : characters_table runInTransaction : false
- - changeset reya : characters_table runInTransaction : false
CREATE TABLE IF NOT EXISTS characters
CREATE TABLE IF NOT EXISTS characters
(
(
id UUID NOT NULL PRIMARY KEY ,
id UUID NOT NULL PRIMARY KEY DEFAULT gen_random_uuid ( ) ,
user_id UUID NOT NULL REFERENCES users ( id ) ON DELETE CASCADE ,
user_id UUID NOT NULL REFERENCES users ( id ) ON DELETE CASCADE ,
name STRING NOT NULL ,
name STRING NOT NULL ,
discriminator INT NULL DEFAULT NULL ,
title STRING NOT NULL ,
title STRING NOT NULL ,
profile STRING NOT NULL ,
profile STRING NOT NULL ,
gender_id INT NOT NULL REFERENCES genders ( id ) ON DELETE RESTRICT ,
gender_id INT NOT NULL REFERENCES genders ( id ) ON DELETE RESTRICT ,
@ -159,51 +167,51 @@ CREATE TABLE IF NOT EXISTS characters
preference_id INT NOT NULL REFERENCES preferences ( id ) ON DELETE RESTRICT ,
preference_id INT NOT NULL REFERENCES preferences ( id ) ON DELETE RESTRICT ,
type1_id INT NOT NULL REFERENCES types ( id ) ON DELETE RESTRICT ,
type1_id INT NOT NULL REFERENCES types ( id ) ON DELETE RESTRICT ,
type2_id INT NOT NULL REFERENCES types ( id ) ON DELETE RESTRICT ,
type2_id INT NOT NULL REFERENCES types ( id ) ON DELETE RESTRICT ,
experience INT NOT NULL DEFAULT 0 ,
experience INT NOT NULL DEFAULT 0 ,
money INT NOT NULL DEFAULT 0 ,
money INT NOT NULL DEFAULT 0 ,
-- stats: base
-- stats: base
base_confidence INT NOT NULL DEFAULT 70 ,
base_confidence INT NOT NULL DEFAULT 70 ,
base_health INT NOT NULL DEFAULT 70 ,
base_health INT NOT NULL DEFAULT 70 ,
base_stamina INT NOT NULL DEFAULT 70 ,
base_stamina INT NOT NULL DEFAULT 70 ,
base_brawn INT NOT NULL DEFAULT 70 ,
base_brawn INT NOT NULL DEFAULT 70 ,
base_durability INT NOT NULL DEFAULT 70 ,
base_durability INT NOT NULL DEFAULT 70 ,
base_intensity INT NOT NULL DEFAULT 70 ,
base_intensity INT NOT NULL DEFAULT 70 ,
base_resilience INT NOT NULL DEFAULT 70 ,
base_resilience INT NOT NULL DEFAULT 70 ,
base_speed INT NOT NULL DEFAULT 70 ,
base_speed INT NOT NULL DEFAULT 70 ,
-- stats: banked talent points
-- stats: banked talent points
min_confidence_talent INT NOT NULL DEFAULT 0 ,
min_confidence_talent INT NOT NULL DEFAULT 0 ,
min_health_talent INT NOT NULL DEFAULT 0 ,
min_health_talent INT NOT NULL DEFAULT 0 ,
min_stamina_talent INT NOT NULL DEFAULT 0 ,
min_stamina_talent INT NOT NULL DEFAULT 0 ,
min_brawn_talent INT NOT NULL DEFAULT 0 ,
min_brawn_talent INT NOT NULL DEFAULT 0 ,
min_durability_talent INT NOT NULL DEFAULT 0 ,
min_durability_talent INT NOT NULL DEFAULT 0 ,
min_intensity_talent INT NOT NULL DEFAULT 0 ,
min_intensity_talent INT NOT NULL DEFAULT 0 ,
min_resilience_talent INT NOT NULL DEFAULT 0 ,
min_resilience_talent INT NOT NULL DEFAULT 0 ,
min_speed_talent INT NOT NULL DEFAULT 0 ,
min_speed_talent INT NOT NULL DEFAULT 0 ,
-- stats: current talent points
-- stats: current talent points
confidence_talent INT NOT NULL DEFAULT floor ( random ( ) * 32 ) : : INT , - - min_confidence_talent + floor ( random ( ) * ( 32 - min_confidence_talent ) ) ,
confidence_talent INT NOT NULL DEFAULT floor ( random ( ) * 32 ) : : INT , - - min_confidence_talent + floor ( random ( ) * ( 32 - min_confidence_talent ) ) ,
health_talent INT NOT NULL DEFAULT floor ( random ( ) * 32 ) : : INT , - - min_health_talent + floor ( random ( ) * ( 32 - min_health_talent ) ) ,
health_talent INT NOT NULL DEFAULT floor ( random ( ) * 32 ) : : INT , - - min_health_talent + floor ( random ( ) * ( 32 - min_health_talent ) ) ,
stamina_talent INT NOT NULL DEFAULT floor ( random ( ) * 32 ) : : INT , - - min_stamina_talent + floor ( random ( ) * ( 32 - min_stamina_talent ) ) ,
stamina_talent INT NOT NULL DEFAULT floor ( random ( ) * 32 ) : : INT , - - min_stamina_talent + floor ( random ( ) * ( 32 - min_stamina_talent ) ) ,
brawn_talent INT NOT NULL DEFAULT floor ( random ( ) * 32 ) : : INT , - - min_brawn_talent + floor ( random ( ) * ( 32 - min_brawn_talent ) ) ,
brawn_talent INT NOT NULL DEFAULT floor ( random ( ) * 32 ) : : INT , - - min_brawn_talent + floor ( random ( ) * ( 32 - min_brawn_talent ) ) ,
durability_talent INT NOT NULL DEFAULT floor ( random ( ) * 32 ) : : INT , - - min_durability_talent + floor ( random ( ) * ( 32 - min_durability_talent ) ) ,
durability_talent INT NOT NULL DEFAULT floor ( random ( ) * 32 ) : : INT , - - min_durability_talent + floor ( random ( ) * ( 32 - min_durability_talent ) ) ,
intensity_talent INT NOT NULL DEFAULT floor ( random ( ) * 32 ) : : INT , - - min_intensity_talent + floor ( random ( ) * ( 32 - min_intensity_talent ) ) ,
intensity_talent INT NOT NULL DEFAULT floor ( random ( ) * 32 ) : : INT , - - min_intensity_talent + floor ( random ( ) * ( 32 - min_intensity_talent ) ) ,
resilience_talent INT NOT NULL DEFAULT floor ( random ( ) * 32 ) : : INT , - - min_resilience_talent + floor ( random ( ) * ( 32 - min_resilience_talent ) ) ,
resilience_talent INT NOT NULL DEFAULT floor ( random ( ) * 32 ) : : INT , - - min_resilience_talent + floor ( random ( ) * ( 32 - min_resilience_talent ) ) ,
speed_talent INT NOT NULL DEFAULT floor ( random ( ) * 32 ) : : INT , - - min_speed_talent + floor ( random ( ) * ( 32 - min_speed_talent ) ) ,
speed_talent INT NOT NULL DEFAULT floor ( random ( ) * 32 ) : : INT , - - min_speed_talent + floor ( random ( ) * ( 32 - min_speed_talent ) ) ,
-- stats: current proficiency points
-- stats: current proficiency points
confidence_proficiency INT NOT NULL DEFAULT 0 ,
confidence_proficiency INT NOT NULL DEFAULT 0 ,
health_proficiency INT NOT NULL DEFAULT 0 ,
health_proficiency INT NOT NULL DEFAULT 0 ,
stamina_proficiency INT NOT NULL DEFAULT 0 ,
stamina_proficiency INT NOT NULL DEFAULT 0 ,
brawn_proficiency INT NOT NULL DEFAULT 0 ,
brawn_proficiency INT NOT NULL DEFAULT 0 ,
durability_proficiency INT NOT NULL DEFAULT 0 ,
durability_proficiency INT NOT NULL DEFAULT 0 ,
intensity_proficiency INT NOT NULL DEFAULT 0 ,
intensity_proficiency INT NOT NULL DEFAULT 0 ,
resilience_proficiency INT NOT NULL DEFAULT 0 ,
resilience_proficiency INT NOT NULL DEFAULT 0 ,
speed_proficiency INT NOT NULL DEFAULT 0 ,
speed_proficiency INT NOT NULL DEFAULT 0 ,
UNIQUE ( user_id , name , discriminator ) ,
FAMILY character_base ( id , user_id , name , title , profile , gender_id , type1_id , type2_id , base_confidence ,
FAMILY character_base ( id , user_id , name , title , profile , gender_id , type1_id , type2_id , base_confidence ,
base_health ,
base_health ,
base_stamina , base_brawn , base_durability , base_intensity , base_resilience , base_speed ) ,
base_stamina , base_brawn , base_durability , base_intensity , base_resilience , base_speed ) ,
FAMILY character_reformation_stats (
FAMILY character_reformation_stats ( min_confidence_talent , min_health_talent , min_stamina_talent , min_brawn_talent ,
min_confidence_talent , min_health_talent , min_stamina_talent , min_brawn_talent ,
min_durability_talent , min_intensity_talent , min_resilience_talent ,
min_durability_talent , min_intensity_talent , min_resilience_talent ,
min_speed_talent ,
min_speed_talent ,
confidence_talent , health_talent , stamina_talent , brawn_talent ,
confidence_talent , health_talent , stamina_talent , brawn_talent ,
@ -212,4 +220,40 @@ CREATE TABLE IF NOT EXISTS characters
health_proficiency , stamina_proficiency , brawn_proficiency , durability_proficiency ,
health_proficiency , stamina_proficiency , brawn_proficiency , durability_proficiency ,
intensity_proficiency , resilience_proficiency , speed_proficiency )
intensity_proficiency , resilience_proficiency , speed_proficiency )
) ;
) ;
- - rollback DROP TABLE IF EXISTS characters_table ;
- - rollback DROP TABLE IF EXISTS characters ;
- - changeset reya : character_creation_table runInTransaction : false
CREATE TABLE IF NOT EXISTS character_creation
(
user_id UUID NOT NULL REFERENCES users ( id ) ON DELETE CASCADE ,
character_id UUID NULL REFERENCES characters ( id ) ON DELETE CASCADE ,
name STRING NULL ,
title STRING NULL ,
profile STRING NULL ,
gender_id INT NULL REFERENCES genders ( id ) ON DELETE RESTRICT ,
difficulty_id INT NULL REFERENCES difficulties ( id ) ON DELETE RESTRICT ,
preference_id INT NULL REFERENCES preferences ( id ) ON DELETE RESTRICT ,
type1_id INT NULL REFERENCES types ( id ) ON DELETE RESTRICT ,
type2_id INT NULL REFERENCES types ( id ) ON DELETE RESTRICT ,
base_confidence INT NULL DEFAULT 70 ,
base_health INT NULL DEFAULT 70 ,
base_stamina INT NULL DEFAULT 70 ,
base_brawn INT NULL DEFAULT 70 ,
base_durability INT NULL DEFAULT 70 ,
base_intensity INT NULL DEFAULT 70 ,
base_resilience INT NULL DEFAULT 70 ,
base_speed INT NULL DEFAULT 70 ,
PRIMARY KEY ( user_id , character_id )
) ;
- - rollback DROP TABLE IF EXISTS character_creation ;
- - changeset reya : userDefaultDifficultyPreferenceGender
ALTER TABLE users
ADD COLUMN default_gender_id INT NULL REFERENCES genders ( id ) ON DELETE RESTRICT DEFAULT NULL
CREATE IF NOT EXISTS FAMILY character_defaults ,
ADD COLUMN default_difficulty_id INT NULL REFERENCES difficulties ( id ) ON DELETE RESTRICT DEFAULT NULL
FAMILY character_defaults ,
ADD COLUMN default_preference_id INT NULL REFERENCES preferences ( id ) ON DELETE RESTRICT DEFAULT NULL
FAMILY character_defaults ;
- - rollback ALTER