This commit is contained in:
Wojciech Borowski-Dobrowolski 2023-12-16 10:17:38 +01:00
commit 919d527245

View File

@ -81,17 +81,15 @@ CREATE TABLE `dim_service_type` (
CREATE TABLE `dim_staff` (
`staff_id` int PRIMARY KEY,
`first_name` varchar(64) ,
`last_name` varchar(64) ,
`full_name` varchar(64) ,
`address` varchar(64) ,
`address2` varchar(64) ,
`city` varchar(64) ,
`country` varchar(64) ,
`manager_id` int ,
`email` varchar(64)
);
CREATE TABLE `dim_cars` (
CREATE TABLE `dim_car` (
`inventory_id` int PRIMARY KEY,
`production_year` int ,
`model` varchar(64) ,
@ -99,10 +97,8 @@ CREATE TABLE `dim_cars` (
`fuel_type` varchar(64) ,
`license_plate` varchar(64) ,
`store_id` int ,
`purchase_price` DECIMAL ,
`sell_price` DECIMAL ,
`availability` varchar(64) ,
`sold` BOOLEAN
`is_rented` varchar(64) ,
`is_sold` varchar(64)
);
ALTER TABLE `fact_service` ADD CONSTRAINT `fact_service_fk0` FOREIGN KEY (`inventory_id`) REFERENCES `dim_cars`(`inventory_id`);