forked from jOOQ/sakila
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
38c2e4e
commit cd11885
Showing
4 changed files
with
231,876 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
Sakila for H2 is a port of the Sakila example database available for MySQL, which was originally developed by Mike Hillyer of the MySQL AB documentation team. | ||
This project is designed to help database administrators to decide which database to use for development of new products | ||
The user can run the same SQL against different kind of databases and compare the performance | ||
License: BSD | ||
Copyright DB Software Laboratory and Data Geekery GmbH (H2 port) | ||
http://www.etl-tools.com / http://www.datageekery.com | ||
*/ | ||
|
||
|
||
-- Delete data | ||
ALTER TABLE staff DROP CONSTRAINT fk_staff_address; | ||
ALTER TABLE staff DROP CONSTRAINT fk_staff_store; | ||
ALTER TABLE store DROP CONSTRAINT fk_store_staff; | ||
DELETE FROM payment ; | ||
DELETE FROM rental ; | ||
DELETE FROM customer ; | ||
DELETE FROM film_category ; | ||
DELETE FROM film_text ; | ||
DELETE FROM film_actor ; | ||
DELETE FROM inventory ; | ||
DELETE FROM film ; | ||
DELETE FROM category ; | ||
DELETE FROM staff ; | ||
DELETE FROM store ; | ||
DELETE FROM actor ; | ||
DELETE FROM address ; | ||
DELETE FROM city ; | ||
DELETE FROM country ; | ||
DELETE FROM language ; | ||
ALTER TABLE staff ADD CONSTRAINT fk_staff_address FOREIGN KEY (address_id) REFERENCES address (address_id); | ||
ALTER TABLE staff ADD CONSTRAINT fk_staff_store FOREIGN KEY (store_id) REFERENCES store (store_id); | ||
ALTER TABLE store ADD CONSTRAINT fk_store_staff FOREIGN KEY (manager_staff_id) REFERENCES staff (staff_id); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
Sakila for H2 is a port of the Sakila example database available for MySQL, which was originally developed by Mike Hillyer of the MySQL AB documentation team. | ||
This project is designed to help database administrators to decide which database to use for development of new products | ||
The user can run the same SQL against different kind of databases and compare the performance | ||
License: BSD | ||
Copyright DB Software Laboratory and Data Geekery GmbH (H2 port) | ||
http://www.etl-tools.com / http://www.datageekery.com | ||
*/ | ||
|
||
-- Drop Views | ||
|
||
DROP VIEW customer_list; | ||
DROP VIEW film_list; | ||
DROP VIEW sales_by_film_category; | ||
DROP VIEW sales_by_store; | ||
DROP VIEW staff_list; | ||
|
||
-- Drop Tables | ||
|
||
DROP TABLE payment; | ||
DROP TABLE rental; | ||
DROP TABLE inventory; | ||
DROP TABLE film_text; | ||
DROP TABLE film_category; | ||
DROP TABLE film_actor; | ||
DROP TABLE film; | ||
DROP TABLE language; | ||
DROP TABLE customer; | ||
DROP TABLE actor; | ||
DROP TABLE category; | ||
ALTER TABLE staff DROP CONSTRAINT fk_staff_address; | ||
ALTER TABLE store DROP CONSTRAINT fk_store_staff; | ||
ALTER TABLE staff DROP CONSTRAINT fk_staff_store; | ||
DROP TABLE store; | ||
DROP TABLE address; | ||
DROP TABLE staff; | ||
DROP TABLE city; | ||
DROP TABLE country; |
Oops, something went wrong.