#!/bin/bash

db2 "connect to W2UI";


db2 "CREATE TABLE USER\
( \
    recid                INTEGER           NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1 INCREMENT BY 1),\
    name                 VARCHAR(100)      WITH DEFAULT,\
    last                 VARCHAR(100)      WITH DEFAULT,\
    email                VARCHAR(100)      WITH DEFAULT,\
    other                VARCHAR(100)      WITH DEFAULT,\
    position_recid       INTEGER,\
PRIMARY KEY (recid)\
\
)\
IN W2UISPACE"


db2 "CREATE TABLE POSITION\
( \
    recid                INTEGER           NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1 INCREMENT BY 1),\
    lon                  VARCHAR(100)      WITH DEFAULT,\
    lat                  VARCHAR(100)      WITH DEFAULT,\
    shortname            VARCHAR(100)      WITH DEFAULT,\
    longname             VARCHAR(100),\
PRIMARY KEY (recid)\
\
)\
IN W2UISPACE"
