Delete SQL
This commit is contained in:
parent
856dfb9a92
commit
db6de4bd8a
22 changed files with 0 additions and 101 deletions
|
@ -1 +0,0 @@
|
||||||
DROP TABLE "authors";
|
|
|
@ -1,8 +0,0 @@
|
||||||
CREATE TEMPORARY TABLE "authors" (
|
|
||||||
"id" serial,
|
|
||||||
"name" varchar UNIQUE,
|
|
||||||
"created_at" timestamp,
|
|
||||||
"updated_at" timestamp,
|
|
||||||
UNIQUE(name),
|
|
||||||
PRIMARY KEY(id)
|
|
||||||
);
|
|
|
@ -1 +0,0 @@
|
||||||
DROP TABLE "books";
|
|
|
@ -1,8 +0,0 @@
|
||||||
CREATE TEMPORARY TABLE "books" (
|
|
||||||
"id" serial,
|
|
||||||
"name" varchar,
|
|
||||||
"created_at" timestamp,
|
|
||||||
"updated_at" timestamp,
|
|
||||||
"author_id" int REFERENCES authors(id) ON DELETE CASCADE,
|
|
||||||
PRIMARY KEY(id)
|
|
||||||
);
|
|
|
@ -1 +0,0 @@
|
||||||
DROP TABLE "cars";
|
|
|
@ -1,10 +0,0 @@
|
||||||
CREATE TEMPORARY TABLE "cars" (
|
|
||||||
"id" serial,
|
|
||||||
"make" varchar,
|
|
||||||
"description" varchar,
|
|
||||||
"family_friendly" boolean,
|
|
||||||
"recalled_at" timestamp,
|
|
||||||
"created_at" timestamp,
|
|
||||||
"updated_at" timestamp,
|
|
||||||
PRIMARY KEY(id)
|
|
||||||
);
|
|
|
@ -1 +0,0 @@
|
||||||
DROP TABLE "customers";
|
|
|
@ -1,6 +0,0 @@
|
||||||
CREATE TEMPORARY TABLE "customers" (
|
|
||||||
"id" serial,
|
|
||||||
"created_at" timestamp,
|
|
||||||
"updated_at" timestamp,
|
|
||||||
PRIMARY KEY(id)
|
|
||||||
);
|
|
|
@ -1 +0,0 @@
|
||||||
DROP TABLE "foots";
|
|
|
@ -1,8 +0,0 @@
|
||||||
CREATE TEMPORARY TABLE "foots" (
|
|
||||||
"id" serial,
|
|
||||||
"leg_id" int,
|
|
||||||
"n_toes" int,
|
|
||||||
"created_at" timestamp,
|
|
||||||
"updated_at" timestamp,
|
|
||||||
PRIMARY KEY(id)
|
|
||||||
);
|
|
|
@ -1 +0,0 @@
|
||||||
DROP TABLE "fruits";
|
|
|
@ -1,8 +0,0 @@
|
||||||
CREATE TEMPORARY TABLE "fruits" (
|
|
||||||
"id" serial,
|
|
||||||
"tree_id" int,
|
|
||||||
"common_name" varchar,
|
|
||||||
"created_at" timestamp,
|
|
||||||
"updated_at" timestamp,
|
|
||||||
PRIMARY KEY(id)
|
|
||||||
);
|
|
|
@ -1 +0,0 @@
|
||||||
DROP TABLE "legs";
|
|
|
@ -1,7 +0,0 @@
|
||||||
CREATE TEMPORARY TABLE "legs" (
|
|
||||||
"id" serial,
|
|
||||||
"name" varchar,
|
|
||||||
"created_at" timestamp,
|
|
||||||
"updated_at" timestamp,
|
|
||||||
PRIMARY KEY(id)
|
|
||||||
);
|
|
|
@ -1 +0,0 @@
|
||||||
DROP TABLE "orders";
|
|
|
@ -1,10 +0,0 @@
|
||||||
CREATE TEMPORARY TABLE "orders" (
|
|
||||||
"id" serial,
|
|
||||||
"customer_id" int,
|
|
||||||
"employee_id" int,
|
|
||||||
"order_date" timestamp,
|
|
||||||
"shipper_id" int,
|
|
||||||
"created_at" timestamp,
|
|
||||||
"updated_at" timestamp,
|
|
||||||
PRIMARY KEY(id)
|
|
||||||
);
|
|
|
@ -1 +0,0 @@
|
||||||
DROP TABLE "roles";
|
|
|
@ -1,7 +0,0 @@
|
||||||
CREATE TEMPORARY TABLE "roles" (
|
|
||||||
"id" serial,
|
|
||||||
"name" varchar,
|
|
||||||
"created_at" timestamp,
|
|
||||||
"updated_at" timestamp,
|
|
||||||
PRIMARY KEY(id)
|
|
||||||
);
|
|
|
@ -1 +0,0 @@
|
||||||
DROP TABLE "trees";
|
|
|
@ -1,8 +0,0 @@
|
||||||
CREATE TEMPORARY TABLE "trees" (
|
|
||||||
"id" serial,
|
|
||||||
"rings" smallint UNIQUE,
|
|
||||||
"created_at" timestamp,
|
|
||||||
"updated_at" timestamp,
|
|
||||||
UNIQUE(rings),
|
|
||||||
PRIMARY KEY(id)
|
|
||||||
);
|
|
|
@ -1 +0,0 @@
|
||||||
DROP TABLE "users";
|
|
|
@ -1,10 +0,0 @@
|
||||||
CREATE TEMPORARY TABLE "users" (
|
|
||||||
"id" serial,
|
|
||||||
"username" varchar,
|
|
||||||
"password" varchar,
|
|
||||||
"email" varchar,
|
|
||||||
"created_at" timestamp,
|
|
||||||
"updated_at" timestamp,
|
|
||||||
"role_id" int REFERENCES roles(id),
|
|
||||||
PRIMARY KEY(id)
|
|
||||||
);
|
|
Loading…
Reference in a new issue