private void createAuditTable()
    {
		
        writeLine("-- create audit table --");
        writeLine("CREATE TABLE " + table.name + "_AUD");
        writeLine("(");
        writeLine("ID int NOT NULL,");
        writeLine("REV int NOT NULL,");
        writeLine("REVTYPE smallint NOT NULL,");

        for (Column column:table.columns) {
            writeLine(column.name + " " + getOracleType(column.dataType) + " NULL,");
        }

        writeLine("CONSTRAINT PK_" + table.name + "_AUD PRIMARY KEY (ID, REV),");
        writeLine("CONSTRAINT FK_" + table.name + "_AUD FOREIGN KEY (REV)");
        writeLine("REFERENCES AUDITENTITY (ID)");
        writeLine(") TABLESPACE " + table.myPackage.model.project.databaseName + "_AUD");
        writeLine("/");
        skipLine();
        
        writeLine("CREATE INDEX FK_" + table.name + "_AUD ON " + this.table.name + "_AUD(REV)");
        writeLine("/");
        skipLine();
    }
private void createAuditTable()
    {
		
        writeLine("-- create audit table --");
        writeLine("CREATE TABLE " + table.name + "_AUD");
        writeLine("(");
        writeLine("ID int NOT NULL,");
        writeLine("REV int NOT NULL,");
        writeLine("REVTYPE smallint NOT NULL,");

        for (Column column:table.columns) {
            writeLine(column.name + " " + getOracleType(column.dataType) + " NULL,");
        }

        writeLine("CONSTRAINT PK_" + table.name + "_AUD PRIMARY KEY (ID, REV),");
        writeLine("CONSTRAINT FK_" + table.name + "_AUD FOREIGN KEY (REV)");
        writeLine("REFERENCES AUDITENTITY (ID)");
        writeLine(") TABLESPACE " + table.myPackage.model.project.databaseName + "_AUD");
        writeLine("/");
        skipLine();
        
        writeLine("CREATE INDEX FK_" + table.name + "_AUD ON " + this.table.name + "_AUD(REV)");
        writeLine("/");
        skipLine();
    }
private void createAuditTable ( ) { writeLine ( "-- create audit table --" ) ; writeLine ( "CREATE TABLE " + table . name + "_AUD" ) ; writeLine ( "(" ) ; writeLine ( "ID int NOT NULL," ) ; writeLine ( "REV int NOT NULL," ) ; writeLine ( "REVTYPE smallint NOT NULL," ) ; for ( Column column : table . columns ) { writeLine ( column . name + " " + getOracleType ( column . dataType ) + " NULL," ) ; } writeLine ( "CONSTRAINT PK_" + table . name + "_AUD PRIMARY KEY (ID, REV)," ) ; writeLine ( "CONSTRAINT FK_" + table . name + "_AUD FOREIGN KEY (REV)" ) ; writeLine ( "REFERENCES AUDITENTITY (ID)" ) ; writeLine ( ") TABLESPACE " + table . myPackage . model . project . databaseName + "_AUD" ) ; writeLine ( "/" ) ; skipLine ( ) ; writeLine ( "CREATE INDEX FK_" + table . name + "_AUD ON " + this . table . name + "_AUD(REV)" ) ; writeLine ( "/" ) ; skipLine ( ) ; }
/*
create audit table
/ * create audit table