from pgConnection import PgConnection
from A02CreateTables import CreateTables
from A01ExecuteSQL import ExecuteSQL
import os
import datetime
import time

#1. CONECTION:
database="utm"
pgconn = PgConnection(database)
os.system('clear')

execCase=2
#2. CREATE UTM MODEL: 
if(execCase==1):
    #create sql schema
    tables = CreateTables(pgconn)
    tables.executeQuery()
    print("Created tables")

#create procedures
if(execCase==2):
    Procedures = ExecuteSQL(pgconn)
    Procedures.createProcedures()

#create triggers to link geofence with eurocae model
if(execCase==3):
    Triggers = ExecuteSQL(pgconn)
    Triggers.createTriggers()

