# Generated by Django 3.0.3 on 2020-03-30 18:33

from django.db import migrations
from django.conf import settings

# if settings.TESTING == 'test':
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0001_initial'),
    ]

    operations = [
        migrations.RunSQL('''
            CREATE TABLE `BICYCLE`
             (	`SERIALNUMBER` DECIMAL(38,0),
              `CUSTOMERID` DECIMAL(38,0) DEFAULT 0,
              `MODELTYPE` VARCHAR(50),
              `PAINTID` DECIMAL(38,0) DEFAULT 0,
              `FRAMESIZE` DOUBLE DEFAULT 0,
              `ORDERDATE` DATETIME,
              `STARTDATE` DATETIME,
              `SHIPDATE` DATETIME,
              `SHIPEMPLOYEE` DECIMAL(38,0) DEFAULT 0,
              `FRAMEASSEMBLER` DECIMAL(38,0) DEFAULT 0,
              `PAINTER` DECIMAL(38,0) DEFAULT 0,
              `CONSTRUCTION` VARCHAR(50) DEFAULT 'Bonded',
              `WATERBOTTLEBRAZEONS` DECIMAL(38,0) DEFAULT 4,
              `CUSTOMNAME` VARCHAR(50),
              `LETTERSTYLEID` VARCHAR(50),
              `STOREID` DECIMAL(38,0) DEFAULT 0,
              `EMPLOYEEID` DECIMAL(38,0) DEFAULT 0,
              `TOPTUBE` DOUBLE DEFAULT 0,
              `CHAINSTAY` DOUBLE DEFAULT 0,
              `HEADTUBEANGLE` DOUBLE DEFAULT 0,
              `SEATTUBEANGLE` DOUBLE DEFAULT 0,
              `LISTPRICE` DECIMAL(38,4) DEFAULT 0,
              `SALEPRICE` DECIMAL(38,4) DEFAULT 0,
              `SALESTAX` DECIMAL(38,4) DEFAULT 0,
              `SALESTATE` VARCHAR(50),
              `SHIPPRICE` DECIMAL(38,4) DEFAULT 0,
              `FRAMEPRICE` DECIMAL(38,4) DEFAULT 0,
              `COMPONENTLIST` DECIMAL(38,4) DEFAULT 0
             );

            CREATE TABLE `BICYCLETUBEUSAGE`
             (	`SERIALNUMBER` DECIMAL(38,0) DEFAULT 0,
              `TUBEID` DECIMAL(38,0) DEFAULT 0,
              `QUANTITY` DOUBLE DEFAULT 0
             );

            CREATE TABLE `BIKEPARTS`
             (	`SERIALNUMBER` DECIMAL(38,0) DEFAULT 0,
              `COMPONENTID` DECIMAL(38,0) DEFAULT 0,
              `SUBSTITUTEID` DECIMAL(38,0) DEFAULT 0,
              `LOCATION` VARCHAR(50),
              `QUANTITY` DECIMAL(38,0) DEFAULT 0,
              `DATEINSTALLED` DATETIME,
              `EMPLOYEEID` DECIMAL(38,0) DEFAULT 0
             );

            CREATE TABLE `BIKETUBES`
             (	`SERIALNUMBER` DECIMAL(38,0) DEFAULT 0,
              `TUBENAME` VARCHAR(50),
              `TUBEID` DECIMAL(38,0) DEFAULT 0,
              `LENGTH` DOUBLE DEFAULT 0
             );

            CREATE TABLE `CITY`
             (	`CITYID` DECIMAL(38,0),
              `ZIPCODE` VARCHAR(50),
              `CITY` VARCHAR(50),
              `STATE` VARCHAR(50),
              `AREACODE` VARCHAR(50),
              `POPULATION1990` DECIMAL(38,0) DEFAULT 0,
              `POPULATION1980` DECIMAL(38,0) DEFAULT 0,
              `COUNTRY` VARCHAR(50),
              `LATITUDE` DOUBLE DEFAULT 0,
              `LONGITUDE` DOUBLE DEFAULT 0,
              `POPULATIONCDF` DOUBLE DEFAULT 0
             );

            CREATE TABLE `COMMONSIZES`
             (	`MODELTYPE` VARCHAR(50),
              `FRAMESIZE` DOUBLE DEFAULT 0
             );

            CREATE TABLE `COMPONENT`
             (	`COMPONENTID` DECIMAL(38,0) DEFAULT 0,
              `MANUFACTURERID` DECIMAL(38,0) DEFAULT 0,
              `PRODUCTNUMBER` VARCHAR(50),
              `ROAD` VARCHAR(50),
              `CATEGORY` VARCHAR(50),
              `LENGTH` DOUBLE DEFAULT 0,
              `HEIGHT` DOUBLE DEFAULT 0,
              `WIDTH` DOUBLE DEFAULT 0,
              `WEIGHT` DOUBLE DEFAULT 0,
              `YEAR` DECIMAL(38,0),
              `ENDYEAR` DECIMAL(38,0),
              `DESCRIPTION` VARCHAR(100),
              `LISTPRICE` DECIMAL(38,4) DEFAULT 0,
              `ESTIMATEDCOST` DECIMAL(38,4) DEFAULT 0,
              `QUANTITYONHAND` DOUBLE DEFAULT 10
             );

            CREATE TABLE `COMPONENTNAME`
             (	`COMPONENTNAME` VARCHAR(50),
              `ASSEMBLYORDER` DECIMAL(38,0) DEFAULT 0,
              `DESCRIPTION` VARCHAR(50)
             );

            CREATE TABLE `CUSTOMER`
             (	`CUSTOMERID` DECIMAL(38,0),
              `PHONE` VARCHAR(50),
              `FIRSTNAME` VARCHAR(50),
              `LASTNAME` VARCHAR(50),
              `ADDRESS` VARCHAR(50),
              `ZIPCODE` VARCHAR(50),
              `CITYID` DECIMAL(38,0) DEFAULT 0,
              `BALANCEDUE` DECIMAL(38,4) DEFAULT 0
             );

            CREATE TABLE `CUSTOMERTRANSACTION`
             (	`CUSTOMERID` DECIMAL(38,0) DEFAULT 0,
              `TRANSACTIONDATE` DATETIME,
              `EMPLOYEEID` DECIMAL(38,0) DEFAULT 0,
              `AMOUNT` DECIMAL(38,4) DEFAULT 0,
              `DESCRIPTION` VARCHAR(250),
              `REFERENCE` DECIMAL(38,0) DEFAULT 0
             );

            CREATE TABLE `EMPLOYEE`
             (	`EMPLOYEEID` DECIMAL(38,0) DEFAULT 0,
              `TAXPAYERID` VARCHAR(50),
              `LASTNAME` VARCHAR(50),
              `FIRSTNAME` VARCHAR(50),
              `HOMEPHONE` VARCHAR(50),
              `ADDRESS` VARCHAR(50),
              `ZIPCODE` VARCHAR(50),
              `CITYID` DECIMAL(38,0) DEFAULT 0,
              `DATEHIRED` DATETIME,
              `DATERELEASED` DATETIME,
              `CURRENTMANAGER` DECIMAL(38,0) DEFAULT 0,
              `SALARYGRADE` DECIMAL(38,0) DEFAULT 0,
              `SALARY` DECIMAL(38,4) DEFAULT 0,
              `TITLE` VARCHAR(100),
              `WORKAREA` VARCHAR(50)
             );

            CREATE TABLE `GROUPCOMPONENTS`
             (	`GROUPID` DECIMAL(38,0) DEFAULT 0,
              `COMPONENTID` DECIMAL(38,0) DEFAULT 0
             );

            CREATE TABLE `GROUPO`
             (	`COMPONENTGROUPID` DECIMAL(38,0),
              `GROUPNAME` VARCHAR(50),
              `BIKETYPE` VARCHAR(50),
              `YEAR` DECIMAL(38,0),
              `ENDYEAR` DECIMAL(38,0),
              `WEIGHT` DECIMAL(15,4)
             );

            CREATE TABLE `LETTERSTYLE`
             (	`LETTERSTYLE` VARCHAR(50),
              `DESCRIPTION` VARCHAR(50)
             );

            CREATE TABLE `MANUFACTURER`
             (	`MANUFACTURERID` DECIMAL(38,0),
              `MANUFACTURERNAME` VARCHAR(50),
              `CONTACTNAME` VARCHAR(50),
              `PHONE` VARCHAR(50),
              `ADDRESS` VARCHAR(50),
              `ZIPCODE` VARCHAR(50),
              `CITYID` DECIMAL(38,0) DEFAULT 0,
              `BALANCEDUE` DECIMAL(38,4) DEFAULT 0
             );

            CREATE TABLE `MANUFACTURERTRANSACTION`
             (	`MANUFACTURERID` DECIMAL(38,0) DEFAULT 0,
              `TRANSACTIONDATE` DATETIME,
              `EMPLOYEEID` DECIMAL(38,0) DEFAULT 0,
              `AMOUNT` DECIMAL(38,4) DEFAULT 0,
              `DESCRIPTION` VARCHAR(250),
              `REFERENCE` DECIMAL(38,0) DEFAULT 0
             );

            CREATE TABLE `MODELSIZE`
             (	`MODELTYPE` VARCHAR(50),
              `MSIZE` DOUBLE DEFAULT 0,
              `TOPTUBE` DOUBLE DEFAULT 0,
              `CHAINSTAY` DOUBLE DEFAULT 0,
              `TOTALLENGTH` DOUBLE DEFAULT 0,
              `GROUNDCLEARANCE` DOUBLE DEFAULT 0,
              `HEADTUBEANGLE` DOUBLE DEFAULT 0,
              `SEATTUBEANGLE` DOUBLE DEFAULT 0
             );

            CREATE TABLE `MODELTYPE`
             (	`MODELTYPE` VARCHAR(50),
              `DESCRIPTION` VARCHAR(50),
              `COMPONENTID` DECIMAL(38,0)
             );

            CREATE TABLE `PAINT`
             (	`PAINTID` DECIMAL(38,0),
              `COLORNAME` VARCHAR(50),
              `COLORSTYLE` VARCHAR(50) DEFAULT 'Solid',
              `COLORLIST` VARCHAR(50),
              `DATEINTRODUCED` DATETIME,
              `DATEDISCONTINUED` DATETIME
             );

            CREATE TABLE `PREFERENCE`
             (	`ITEMNAME` VARCHAR(50),
              `VALUE` DOUBLE DEFAULT 0,
              `DESCRIPTION` VARCHAR(250),
              `DATECHANGED` DATETIME
             );

            CREATE TABLE `PURCHASEITEM`
             (	`PURCHASEID` DECIMAL(38,0) DEFAULT 0,
              `COMPONENTID` DECIMAL(38,0) DEFAULT 0,
              `PRICEPAID` DECIMAL(38,4) DEFAULT 0,
              `QUANTITY` DECIMAL(38,0) DEFAULT 0,
              `QUANTITYRECEIVED` DECIMAL(38,0) DEFAULT 0
             );

            CREATE TABLE `PURCHASEORDER`
             (	`PURCHASEID` DECIMAL(38,0),
              `EMPLOYEEID` DECIMAL(38,0) DEFAULT 0,
              `MANUFACTURERID` DECIMAL(38,0) DEFAULT 0,
              `TOTALLIST` DECIMAL(38,4) DEFAULT 0,
              `SHIPPINGCOST` DECIMAL(38,4) DEFAULT 0,
              `DISCOUNT` DECIMAL(38,4) DEFAULT 0,
              `ORDERDATE` DATETIME,
              `RECEIVEDATE` DATETIME,
              `AMOUNTDUE` DECIMAL(38,4) DEFAULT 0
             );

            CREATE TABLE `RETAILSTORE`
             (	`STOREID` DECIMAL(38,0),
              `STORENAME` VARCHAR(50),
              `PHONE` VARCHAR(50),
              `CONTACTFIRSTNAME` VARCHAR(50),
              `CONTACTLASTNAME` VARCHAR(50),
              `ADDRESS` VARCHAR(50),
              `ZIPCODE` VARCHAR(50),
              `CITYID` DECIMAL(38,0) DEFAULT 0
             );

            CREATE TABLE `REVISIONHISTORY`
             (	`ID` DECIMAL(38,0),
              `VERSION` VARCHAR(50),
              `CHANGEDATE` DATETIME,
              `NAME` VARCHAR(50),
              `REVISIONCOMMENTS` VARCHAR(250)
             );

            CREATE TABLE `SAMPLENAME`
             (	`ID` DECIMAL(38,0),
              `LASTNAME` VARCHAR(50),
              `FIRSTNAME` VARCHAR(50),
              `GENDER` VARCHAR(50)
             );

            CREATE TABLE `SAMPLESTREET`
             (	`ID` DECIMAL(38,0),
              `BASEADDRESS` VARCHAR(50)
             );

            CREATE TABLE `STATETAXRATE`
             (	`STATE` VARCHAR(50),
              `TAXRATE` DOUBLE DEFAULT 0
             );

            CREATE TABLE `TEMPDATEMADE`
             (	`DATEVALUE` DATETIME,
              `MADECOUNT` DOUBLE DEFAULT 0
             );

            CREATE TABLE `TUBEMATERIAL`
             (	`TUBEID` DECIMAL(38,0) DEFAULT 0,
              `MATERIAL` VARCHAR(50),
              `DESCRIPTION` VARCHAR(100),
              `DIAMETER` DOUBLE DEFAULT 0,
              `THICKNESS` DOUBLE DEFAULT 0,
              `ROUNDNESS` VARCHAR(50),
              `WEIGHT` DOUBLE DEFAULT 0,
              `STIFFNESS` DOUBLE DEFAULT 0,
              `LISTPRICE` DECIMAL(38,4) DEFAULT 1,
              `CONSTRUCTION` VARCHAR(50) DEFAULT 'Bonded'
             );

            CREATE TABLE `WORKAREA`
             (	`WORKAREA` VARCHAR(50),
              `DESCRIPTION` VARCHAR(50)
             );
        '''),
    ]
