Add Tag, SpecialCake, Cake.Tags, Order.SpecialCakes types. Add migrations for tag, cake_tag, special_cake, special_cake_tag tables. Add store methods: GetTags, GetCakeTags, SaveCakeTags, CreateTag, GetSpecialCakes, GetSpecialCakeTags, SaveSpecialCakes, saveSpecialCakeTags. Load tags in GetCake/GetCakes, cascade tag saves in SaveCake. Remove debug log calls from ParsePrice.
10 lines
278 B
SQL
10 lines
278 B
SQL
create table tag (
|
|
id integer primary key autoincrement,
|
|
name text not null unique
|
|
);
|
|
|
|
create table cake_tag (
|
|
cake integer not null references cake(id) on delete cascade,
|
|
tag integer not null references tag(id) on delete cascade,
|
|
primary key (cake, tag)
|
|
);
|