platform/angel_orm_postgres/test/migrations/weird_join.sql
2019-04-08 12:58:41 -04:00

13 lines
No EOL
345 B
SQL

CREATE TEMPORARY TABLE "weird_joins" (
"id" serial,
"join_name" varchar(255) references unorthodoxes(name),
PRIMARY KEY(id)
);
CREATE TEMPORARY TABLE "foos" (
"bar" varchar(255),
PRIMARY KEY(bar)
);
CREATE TEMPORARY TABLE "foo_pivots" (
"weird_join_id" int references weird_joins(id),
"foo_bar" varchar(255) references foos(bar)
);