# resetCustTab.sql

#createCustomerTable.sql from Amazing Stuff 4
#Table structure for table as_Customer

CREATE TABLE as_Customer
(
  customer_id INT NOT NULL AUTO_INCREMENT,
  salutation VARCHAR(4) NOT NULL,
  first_name VARCHAR(15) NOT NULL,
  middle_initial VARCHAR(2) DEFAULT NULL,
  last_name VARCHAR(15) NOT NULL,
  gender VARCHAR(6) NOT NULL,
  email VARCHAR(30) NOT NULL UNIQUE,
  phone VARCHAR(15) DEFAULT NULL,
  street VARCHAR(30) NOT NULL,
  city VARCHAR(15) NOT NULL,
  region VARCHAR(2) NOT NULL,
  postal_code VARCHAR(7) NOT NULL,
  date_time DATETIME NOT NULL,
  login_name VARCHAR(15) NOT NULL,
  login_password VARCHAR(60) NOT NULL,
  PRIMARY KEY (customer_id)
);

# insertMe.sql from Amazing Stuff 4
INSERT INTO as_Customer
(
    salutation, first_name, middle_initial, last_name, gender,
    email, phone, street, city, region, postal_code,
    date_time, login_name, login_password)
VALUES
(
    'Mr.', 'Porter', 'F.', 'Scobey', 'Male',
    'porter.scobey@smu.ca', '902-423-1234',
    '123 Main St.', 'Halifax', 'NS', 'A1B 2C3', SYSDATE(), 'porter',
    '$2y$10$7zY.o6kmfbQ2TtAAqdF0Zu2iPztrkNP.B3b6pD3/CRhI0fgpgXjJO'
);

# insertMe1.sql from Amazing Stuff 4
INSERT INTO as_Customer
(
    salutation, first_name, middle_initial, last_name, gender,
    email, phone, street, city, region, postal_code,
    date_time, login_name, login_password)
VALUES
(
    'Mr.', 'Porter', 'F.', 'Scobey', 'Male',
    'porter.scobey@gmail.com', '902-423-1234',
    '123 Main St.', 'Halifax', 'NS', 'A1B 2C3', SYSDATE(), 'porter1',
    '$2y$10$7zY.o6kmfbQ2TtAAqdF0Zu2iPztrkNP.B3b6pD3/CRhI0fgpgXjJO'
);

