apiVersion: v1
kind: ConfigMap
metadata:
  name: mysql-initdb-config
data:
  initdb.sql: |
    CREATE DATABASE IF NOT EXISTS `microservices-orders`;
    USE `microservices-orders`;
    CREATE TABLE IF NOT EXISTS customers (id INTEGER KEY NOT NULL, firstName VARCHAR(255), lastName VARCHAR(255), email VARCHAR(255), address VARCHAR(255), level VARCHAR(255));
    INSERT IGNORE INTO customers (id, firstName, lastName, email, address, level) VALUES (1,'Jay','Kreps','devnull@confluent.io','101 Street Name, Anytown, State','platinum');
    INSERT IGNORE INTO customers (id, firstName, lastName, email, address, level) VALUES (2,'Neha','Narkhede','devnull@confluent.io','101 Street Name, Anytown, State','platinum');
    INSERT IGNORE INTO customers (id, firstName, lastName, email, address, level) VALUES (3,'Jun','Rao','devnull@confluent.io','101 Street Name, Anytown, State','platinum');
    INSERT IGNORE INTO customers (id, firstName, lastName, email, address, level) VALUES (4,'Trisha','Smith','devnull@confluent.io','101 Street Name, Anytown, State','bronze');
    INSERT IGNORE INTO customers (id, firstName, lastName, email, address, level) VALUES (5,'Monica','Brown','devnull@confluent.io','101 Street Name, Anytown, State','gold');
    INSERT IGNORE INTO customers (id, firstName, lastName, email, address, level) VALUES (6,'Gaurav','Night','devnull@confluent.io','101 Street Name, Anytown, State','silver');
    INSERT IGNORE INTO customers (id, firstName, lastName, email, address, level) VALUES (7,'Amanda','Leeworth','devnull@confluent.io','101 Street Name, Anytown, State','gold');
    INSERT IGNORE INTO customers (id, firstName, lastName, email, address, level) VALUES (8,'Lisa','Champion','devnull@confluent.io','101 Street Name, Anytown, State','silver');
    INSERT IGNORE INTO customers (id, firstName, lastName, email, address, level) VALUES (9,'Bob','West','devnull@confluent.io','101 Street Name, Anytown, State','bronze');

