| author | Tomas Zeman <tzeman@volny.cz> |
| Wed, 09 May 2012 22:53:03 +0200 | |
| changeset 98 | eac38214183d |
| child 99 | 49eb72a46208 |
| permissions | -rw-r--r-- |
|
98
eac38214183d
9830b81e1c79d212 Project locations
Tomas Zeman <tzeman@volny.cz>
parents:
diff
changeset
|
1 |
-- DATABASE SCHEMA CHANGES BETWEEN 0.2 -> 0.3 VERSION |
|
eac38214183d
9830b81e1c79d212 Project locations
Tomas Zeman <tzeman@volny.cz>
parents:
diff
changeset
|
2 |
|
|
eac38214183d
9830b81e1c79d212 Project locations
Tomas Zeman <tzeman@volny.cz>
parents:
diff
changeset
|
3 |
-- project_location |
|
eac38214183d
9830b81e1c79d212 Project locations
Tomas Zeman <tzeman@volny.cz>
parents:
diff
changeset
|
4 |
create table "project_location" ( |
|
eac38214183d
9830b81e1c79d212 Project locations
Tomas Zeman <tzeman@volny.cz>
parents:
diff
changeset
|
5 |
"location" bigint not null, |
|
eac38214183d
9830b81e1c79d212 Project locations
Tomas Zeman <tzeman@volny.cz>
parents:
diff
changeset
|
6 |
"project" bigint not null |
|
eac38214183d
9830b81e1c79d212 Project locations
Tomas Zeman <tzeman@volny.cz>
parents:
diff
changeset
|
7 |
); |
|
eac38214183d
9830b81e1c79d212 Project locations
Tomas Zeman <tzeman@volny.cz>
parents:
diff
changeset
|
8 |
alter table "project_location" add foreign key ("project") references "project"("id") on delete cascade;
|
|
eac38214183d
9830b81e1c79d212 Project locations
Tomas Zeman <tzeman@volny.cz>
parents:
diff
changeset
|
9 |
alter table "project_location" add foreign key ("location") references "location"("id") on delete cascade;
|
|
eac38214183d
9830b81e1c79d212 Project locations
Tomas Zeman <tzeman@volny.cz>
parents:
diff
changeset
|
10 |
alter table "project_location" add unique("project","location");
|