You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
629 B
24 lines
629 B
DROP TABLE IF EXISTS PARKING;
|
|
DROP TABLE IF EXISTS USERS;
|
|
DROP TABLE IF EXISTS PARKING_USAGE;
|
|
|
|
CREATE TABLE IF NOT EXISTS PARKING (
|
|
PARKING_CODE INT(4) NOT NULL UNIQUE,
|
|
PARKING_STATUS BOOLEAN NOT NULL
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS USERS (
|
|
USER_NO INT(4) AUTO_INCREMENT,
|
|
USER_NAME VARCHAR(40) NOT NULL UNIQUE,
|
|
USER_PASS VARCHAR(40) NOT NULL,
|
|
PRIMARY KEY(USER_NO)
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS PARKING_USAGE (
|
|
PARKING_USAGE_NO INT(10) AUTO_INCREMENT,
|
|
PARKING_METER INT(10) NOT NULL,
|
|
PARKING_DATE DATETIME NOT NULL,
|
|
PRIMARY KEY(PARKING_USAGE_NO)
|
|
);
|
|
|
|
INSERT INTO USERS(USER_NAME, USER_PASS) VALUES("root", "root");
|
|
|