[feat] add initial database schema with tables, triggers, and views
This commit is contained in:
15
database/main/species_attribute_mod.sql
Normal file
15
database/main/species_attribute_mod.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
create table species_attribute_mod
|
||||
(
|
||||
species_id INTEGER not null
|
||||
references species
|
||||
on delete cascade,
|
||||
attribute_id INTEGER not null
|
||||
references attribute
|
||||
on delete restrict,
|
||||
delta INTEGER not null,
|
||||
primary key (species_id, attribute_id)
|
||||
);
|
||||
|
||||
create index idx_species_attrmod_attr
|
||||
on species_attribute_mod (attribute_id);
|
||||
|
Reference in New Issue
Block a user