added decks table
This commit is contained in:
parent
030195bfb2
commit
d7c708aab3
@ -11,14 +11,22 @@ create table sessions (
|
|||||||
);
|
);
|
||||||
create table locations (
|
create table locations (
|
||||||
locationID UUID PRIMARY KEY,
|
locationID UUID PRIMARY KEY,
|
||||||
|
locationKey VARCHAR (256) NOT NULL,
|
||||||
sessionID UUID REFERENCES sessions(sessionID),
|
sessionID UUID REFERENCES sessions(sessionID),
|
||||||
locationType text CHECK (locationType = 'deck' or 'hand' or 'discard'),
|
locationType text CHECK (locationType = 'deck' or 'hand' or 'discard'),
|
||||||
showPublic boolean NOT NULL
|
showPublic boolean NOT NULL
|
||||||
);
|
);
|
||||||
|
create table decks (
|
||||||
|
deckID UUID PRIMPARY KEY,
|
||||||
|
deckKey VARCHAR (256) NOT NULL,
|
||||||
|
sessionID UUID REFERENCES sessions(sessionID),
|
||||||
|
locationID UUID REFERENCES locations(locationID)
|
||||||
|
);
|
||||||
create table cards (
|
create table cards (
|
||||||
cardID UUID PRIMARY KEY
|
cardID UUID PRIMARY KEY
|
||||||
sessionID UUID REFERENCES sessions(sessionID),
|
sessionID UUID REFERENCES sessions(sessionID),
|
||||||
locationID UUID REFERENCES locations(locationID),
|
locationID UUID REFERENCES locations(locationID),
|
||||||
|
deckID UUID REFERENCES decks(deckID),
|
||||||
cardContent text NOT NULL,
|
cardContent text NOT NULL,
|
||||||
position integer NOT NULL
|
position integer NOT NULL
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user