platform/angel_orm_mysql/test/migrations/weird_join.sql

13 lines
345 B
MySQL
Raw Normal View History

2019-04-08 17:08:54 +00:00
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)
);