mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-06 11:58:38 +00:00
Levels save into database
This commit is contained in:
parent
15f974fba1
commit
e554ee04c7
5 changed files with 94 additions and 4 deletions
36
DatabaseMigrations/2.sql
Normal file
36
DatabaseMigrations/2.sql
Normal file
|
@ -0,0 +1,36 @@
|
|||
create table Slots
|
||||
(
|
||||
SlotId int,
|
||||
CreatorId int not null,
|
||||
Name text not null,
|
||||
Description text not null,
|
||||
IconHash text not null,
|
||||
RootLevel text not null,
|
||||
Resource text not null,
|
||||
LocationId int not null,
|
||||
InitiallyLocked bool default false not null,
|
||||
SubLevel bool default false null,
|
||||
Lbp1Only bool default false not null,
|
||||
Shareable int default 0 not null,
|
||||
AuthorLabels text not null,
|
||||
BackgroundHash text not null,
|
||||
MinimumPlayers int default 1 not null,
|
||||
MaximumPlayers int default 4 not null,
|
||||
MoveRequired bool default false null
|
||||
);
|
||||
|
||||
create unique index Slots_SlotId_uindex
|
||||
on Slots (SlotId);
|
||||
|
||||
alter table Slots
|
||||
add constraint Slots_pk
|
||||
primary key (SlotId);
|
||||
|
||||
alter table Slots
|
||||
modify SlotId int auto_increment;
|
||||
|
||||
alter table Slots
|
||||
alter column CreatorId set default -1;
|
||||
|
||||
alter table Slots
|
||||
modify CreatorId int not null after LocationId;
|
Loading…
Add table
Add a link
Reference in a new issue