diff options
| author | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:08:27 +0200 |
|---|---|---|
| committer | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:08:27 +0200 |
| commit | c9b6b9a5ca082fe7c1b6f58d7713f785a9eb6a5c (patch) | |
| tree | 3e4f42f93c7ae89a364e4d51fff6e5cec4e55fa9 /graphs/sql/a_new_dawn | |
add: graphs et rushs
Diffstat (limited to 'graphs/sql/a_new_dawn')
| -rw-r--r-- | graphs/sql/a_new_dawn/req01.sql | 66 | ||||
| -rw-r--r-- | graphs/sql/a_new_dawn/req02.sql | 8 | ||||
| -rw-r--r-- | graphs/sql/a_new_dawn/req03.sql | 6 | ||||
| -rw-r--r-- | graphs/sql/a_new_dawn/req04.sql | 3 | ||||
| -rw-r--r-- | graphs/sql/a_new_dawn/req05.sql | 5 | ||||
| -rw-r--r-- | graphs/sql/a_new_dawn/req06.sql | 5 |
6 files changed, 93 insertions, 0 deletions
diff --git a/graphs/sql/a_new_dawn/req01.sql b/graphs/sql/a_new_dawn/req01.sql new file mode 100644 index 0000000..78015ec --- /dev/null +++ b/graphs/sql/a_new_dawn/req01.sql @@ -0,0 +1,66 @@ +CREATE SCHEMA nexus; +CREATE SCHEMA nexus_it; +CREATE SCHEMA techwave; +CREATE SCHEMA nexus_food; +CREATE SCHEMA guardforce; +CREATE TYPE nexus.position AS ENUM ( + 'JUNIOR', + 'SENIOR', + 'MANAGER', + 'DIRECTOR' +); +CREATE TYPE nexus.relationship_type AS ENUM ( + 'PARENT', + 'SUBSIDIARY', + 'AFFILIATE' +); +CREATE TYPE nexus_food.nutriscore AS ENUM ( + 'A', + 'B', + 'C', + 'D', + 'E' +); +CREATE TABLE nexus.employees +( + id SERIAL PRIMARY KEY, + first_name VARCHAR(25), + last_name VARCHAR(25), + employee_position nexus.position, + salary NUMERIC(10, 2) +); +CREATE TABLE nexus.nexus_relations +( + id SERIAL PRIMARY KEY, + parent_company VARCHAR(25), + child_company VARCHAR(25), + relationship_type nexus.relationship_type +); +CREATE TABLE nexus_it.software_assets +( + id SERIAL PRIMARY KEY, + software_name VARCHAR(50), + license_key UUID, + expiration_date DATE +); +CREATE TABLE techwave.project_milestones +( + id SERIAL PRIMARY KEY, + milestone_name VARCHAR(50), + due_date DATE, + completion_status BOOLEAN +); +CREATE TABLE nexus_food.products +( + id SERIAL PRIMARY KEY, + product_name VARCHAR(25), + product_nutriscore nexus_food.nutriscore +); +CREATE TABLE guardforce.incident_reports +( + id SERIAL PRIMARY KEY, + incident_description TEXT, + incident_date TIMESTAMP, + incident_location VARCHAR(50), + reported_by VARCHAR(50) +); diff --git a/graphs/sql/a_new_dawn/req02.sql b/graphs/sql/a_new_dawn/req02.sql new file mode 100644 index 0000000..6c705da --- /dev/null +++ b/graphs/sql/a_new_dawn/req02.sql @@ -0,0 +1,8 @@ +ALTER TABLE nexus.employees +ADD email VARCHAR(50); +ALTER TABLE nexus_it.software_assets +DROP IF EXISTS license_key; +ALTER TABLE nexus_food.products +RENAME COLUMN product_name TO product_title; +ALTER TABLE nexus.employees +ALTER COLUMN salary TYPE INTEGER; diff --git a/graphs/sql/a_new_dawn/req03.sql b/graphs/sql/a_new_dawn/req03.sql new file mode 100644 index 0000000..ef8c903 --- /dev/null +++ b/graphs/sql/a_new_dawn/req03.sql @@ -0,0 +1,6 @@ +DROP TABLE nexus.employees; +DROP TABLE nexus.nexus_relations; +DROP TABLE nexus_it.software_assets; +DROP TABLE techwave.project_milestones; +DROP TABLE nexus_food.products; +DROP TABLE guardforce.incident_reports; diff --git a/graphs/sql/a_new_dawn/req04.sql b/graphs/sql/a_new_dawn/req04.sql new file mode 100644 index 0000000..e3eb7cf --- /dev/null +++ b/graphs/sql/a_new_dawn/req04.sql @@ -0,0 +1,3 @@ +DROP TYPE nexus.position; +DROP TYPE nexus.relationship_type; +DROP TYPE nexus_food.nutriscore; diff --git a/graphs/sql/a_new_dawn/req05.sql b/graphs/sql/a_new_dawn/req05.sql new file mode 100644 index 0000000..d99e6e8 --- /dev/null +++ b/graphs/sql/a_new_dawn/req05.sql @@ -0,0 +1,5 @@ +DROP SCHEMA nexus; +DROP SCHEMA nexus_it; +DROP SCHEMA techwave; +DROP SCHEMA nexus_food; +DROP SCHEMA guardforce; diff --git a/graphs/sql/a_new_dawn/req06.sql b/graphs/sql/a_new_dawn/req06.sql new file mode 100644 index 0000000..87eb6e3 --- /dev/null +++ b/graphs/sql/a_new_dawn/req06.sql @@ -0,0 +1,5 @@ +DROP SCHEMA IF EXISTS nexus CASCADE; +DROP SCHEMA IF EXISTS nexus_it CASCADE; +DROP SCHEMA IF EXISTS nexus_food CASCADE; +DROP SCHEMA IF EXISTS techwave CASCADE; +DROP SCHEMA IF EXISTS guardforce CASCADE; |
