Created
December 6, 2016 13:11
-
-
Save fab1an/1c2c04038149ef514df68434f2ad027e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## works | |
create schema core; | |
create table core.items ( | |
id serial primary key | |
); | |
create table core.other ( | |
id serial primary key, | |
item_id int not null references core.items on delete restrict | |
); | |
create view api.core_other as | |
select * from core.other; | |
create view api.core_items as | |
select * from core.items; | |
## does not work | |
create table items ( | |
id serial primary key | |
); | |
create table other ( | |
id serial primary key, | |
item_id int not null references items on delete restrict | |
); | |
create view api.other as | |
select * from other; | |
create view api.items as | |
select * from items; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment