mirror of
https://github.com/ethanrusz/scouter.git
synced 2024-11-24 04:27:46 -05:00
Update database creation script
This commit is contained in:
parent
0f9eadd610
commit
94bfea56b7
1 changed files with 55 additions and 5 deletions
|
@ -4,13 +4,42 @@ create table if not exists moon_tier
|
||||||
tier_name text not null
|
tier_name text not null
|
||||||
);
|
);
|
||||||
|
|
||||||
|
create table if not exists risk_level
|
||||||
|
(
|
||||||
|
risk_level_id int primary key,
|
||||||
|
risk_level_name text not null
|
||||||
|
);
|
||||||
|
|
||||||
|
create table if not exists layout
|
||||||
|
(
|
||||||
|
layout_id int primary key,
|
||||||
|
layout_name text not null
|
||||||
|
);
|
||||||
|
|
||||||
|
create table if not exists weather
|
||||||
|
(
|
||||||
|
weather_id int primary key,
|
||||||
|
weather_name text not null,
|
||||||
|
effect text
|
||||||
|
);
|
||||||
|
|
||||||
create table if not exists moon
|
create table if not exists moon
|
||||||
(
|
(
|
||||||
moon_id int primary key,
|
moon_id int primary key,
|
||||||
moon_name text not null,
|
moon_name text not null,
|
||||||
moon_tier_id int not null,
|
risk_level_id int not null,
|
||||||
|
cost int not null,
|
||||||
|
default_layout_id int not null,
|
||||||
|
map_size_multiplier real not null,
|
||||||
|
min_scrap int not null,
|
||||||
|
max_scrap int not null,
|
||||||
outside_max_power int not null,
|
outside_max_power int not null,
|
||||||
inside_max_power int not null,
|
inside_max_power int not null,
|
||||||
|
moon_tier_id int not null,
|
||||||
|
foreign key (risk_level_id)
|
||||||
|
references risk_level (risk_level_id),
|
||||||
|
foreign key (default_layout_id)
|
||||||
|
references layout (layout_id),
|
||||||
foreign key (moon_tier_id)
|
foreign key (moon_tier_id)
|
||||||
references moon_tier (moon_tier_id)
|
references moon_tier (moon_tier_id)
|
||||||
);
|
);
|
||||||
|
@ -41,6 +70,27 @@ create table if not exists creature
|
||||||
references moon (moon_id)
|
references moon (moon_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
create table if not exists scrap
|
||||||
|
(
|
||||||
|
scrap_id int primary key,
|
||||||
|
scrap_name text not null,
|
||||||
|
min_value int not null,
|
||||||
|
max_value int not null,
|
||||||
|
weight int not null,
|
||||||
|
conductive int not null,
|
||||||
|
two_handed int not null
|
||||||
|
);
|
||||||
|
|
||||||
|
create table if not exists viable_weather
|
||||||
|
(
|
||||||
|
moon_id int not null,
|
||||||
|
weather_id int not null,
|
||||||
|
foreign key (moon_id)
|
||||||
|
references moon (moon_id),
|
||||||
|
foreign key (weather_id)
|
||||||
|
references weather (weather_id)
|
||||||
|
);
|
||||||
|
|
||||||
create table if not exists spawn_chance
|
create table if not exists spawn_chance
|
||||||
(
|
(
|
||||||
moon_id int not null,
|
moon_id int not null,
|
||||||
|
|
Loading…
Reference in a new issue