-
Notifications
You must be signed in to change notification settings - Fork 2
/
CreateVehicleTable.sql
47 lines (38 loc) · 1.41 KB
/
CreateVehicleTable.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
-- MySQL Script generated by MySQL Workbench
-- Mon Oct 2 17:32:46 2017
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
-- Schema mydb
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Schema project1
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Schema project1
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `project1` ;
USE `project1` ;
-- -----------------------------------------------------
-- Table `project1`.`vehicles`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `project1`.`vehicles` (
`plate` VARCHAR(45) NOT NULL,
`tax_id` VARCHAR(45) NOT NULL,
`exp_date` DATE NOT NULL,
PRIMARY KEY (`plate`))
ENGINE = InnoDB;
USE `project1` ;
-- -----------------------------------------------------
-- routine1
-- -----------------------------------------------------
DELIMITER $$
USE `project1`$$
$$
DELIMITER ;
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;