diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-09-26 12:13:59 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-09-26 12:13:59 +0200 |
commit | 982a102b436d47ea2b1ae0a8ba8f33399a5a5ce1 (patch) | |
tree | 70a895cbd09d2722f7f1399840cfd1bc6649f62e /database/views.sql | |
parent | f2f87aa8a7ccf2410d9ef567ef046b9e07355aba (diff) | |
download | Ishtar-982a102b436d47ea2b1ae0a8ba8f33399a5a5ce1.tar.bz2 Ishtar-982a102b436d47ea2b1ae0a8ba8f33399a5a5ce1.zip |
Update documentation
Diffstat (limited to 'database/views.sql')
-rw-r--r-- | database/views.sql | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/database/views.sql b/database/views.sql new file mode 100644 index 000000000..a924fbfc0 --- /dev/null +++ b/database/views.sql @@ -0,0 +1,15 @@ +create view file_department (id, department_id, file_id) as + select town."id", town."departement_id", file_towns."file_id" + from ishtar_base_town town + inner join ishtar_base_file_towns file_towns on + file_towns."town_id"=town."id" order by town."departement_id"; +CREATE RULE file_department_delete + AS ON DELETE TO file_department DO INSTEAD(); +create view operation_department (id, department_id, operation_id) as + select town."id", town."departement_id", operation_towns."operation_id" + from ishtar_base_town town + inner join ishtar_base_operation_towns operation_towns on + operation_towns."town_id"=town."id" order by town."departement_id"; +CREATE RULE operation_department_delete + AS ON DELETE TO operation_department DO INSTEAD(); + |