diff --git a/src/AbstractNamingStrategy.ts b/src/AbstractNamingStrategy.ts index b568992..4626962 100644 --- a/src/AbstractNamingStrategy.ts +++ b/src/AbstractNamingStrategy.ts @@ -1,6 +1,6 @@ -import RelationInfo from "./models/RelationInfo"; -import EntityInfo from "./models/EntityInfo"; -import ColumnInfo from "./models/ColumnInfo"; +import RelationInfo from "./oldModels/RelationInfo"; +import EntityInfo from "./oldModels/EntityInfo"; +import ColumnInfo from "./oldModels/ColumnInfo"; export default abstract class AbstractNamingStrategy { public abstract relationName( diff --git a/src/Engine.ts b/src/Engine.ts index 687d26b..ecfcfee 100644 --- a/src/Engine.ts +++ b/src/Engine.ts @@ -6,7 +6,7 @@ import MssqlDriver from "./drivers/MssqlDriver"; import MariaDbDriver from "./drivers/MariaDbDriver"; import IConnectionOptions from "./IConnectionOptions"; import IGenerationOptions from "./IGenerationOptions"; -import EntityInfo from "./models/EntityInfo"; +import EntityInfo from "./oldModels/EntityInfo"; import PostgresDriver from "./drivers/PostgresDriver"; import MysqlDriver from "./drivers/MysqlDriver"; import OracleDriver from "./drivers/OracleDriver"; diff --git a/src/NamingStrategy.ts b/src/NamingStrategy.ts index bcdde51..9b3593a 100644 --- a/src/NamingStrategy.ts +++ b/src/NamingStrategy.ts @@ -1,6 +1,6 @@ import AbstractNamingStrategy from "./AbstractNamingStrategy"; -import RelationInfo from "./models/RelationInfo"; -import EntityInfo from "./models/EntityInfo"; +import RelationInfo from "./oldModels/RelationInfo"; +import EntityInfo from "./oldModels/EntityInfo"; import changeCase = require("change-case"); diff --git a/src/drivers/AbstractDriver.ts b/src/drivers/AbstractDriver.ts index 171444b..30c7246 100644 --- a/src/drivers/AbstractDriver.ts +++ b/src/drivers/AbstractDriver.ts @@ -5,12 +5,12 @@ import { } from "typeorm/driver/types/ColumnTypes"; import { DataTypeDefaults } from "typeorm/driver/types/DataTypeDefaults"; import * as TomgUtils from "../Utils"; -import EntityInfo from "../models/EntityInfo"; -import RelationInfo from "../models/RelationInfo"; -import ColumnInfo from "../models/ColumnInfo"; +import EntityInfo from "../oldModels/EntityInfo"; +import RelationInfo from "../oldModels/RelationInfo"; +import ColumnInfo from "../oldModels/ColumnInfo"; import IConnectionOptions from "../IConnectionOptions"; -import IndexInfo from "../models/IndexInfo"; -import RelationTempInfo from "../models/RelationTempInfo"; +import IndexInfo from "../oldModels/IndexInfo"; +import RelationTempInfo from "../oldModels/RelationTempInfo"; export default abstract class AbstractDriver { public abstract standardPort: number; diff --git a/src/drivers/MssqlDriver.ts b/src/drivers/MssqlDriver.ts index 2aed97b..fd887ab 100644 --- a/src/drivers/MssqlDriver.ts +++ b/src/drivers/MssqlDriver.ts @@ -4,11 +4,11 @@ import * as TypeormDriver from "typeorm/driver/sqlserver/SqlServerDriver"; import { DataTypeDefaults } from "typeorm/driver/types/DataTypeDefaults"; import * as TomgUtils from "../Utils"; import AbstractDriver from "./AbstractDriver"; -import EntityInfo from "../models/EntityInfo"; -import ColumnInfo from "../models/ColumnInfo"; -import IndexInfo from "../models/IndexInfo"; -import IndexColumnInfo from "../models/IndexColumnInfo"; -import RelationTempInfo from "../models/RelationTempInfo"; +import EntityInfo from "../oldModels/EntityInfo"; +import ColumnInfo from "../oldModels/ColumnInfo"; +import IndexInfo from "../oldModels/IndexInfo"; +import IndexColumnInfo from "../oldModels/IndexColumnInfo"; +import RelationTempInfo from "../oldModels/RelationTempInfo"; import IConnectionOptions from "../IConnectionOptions"; export default class MssqlDriver extends AbstractDriver { diff --git a/src/drivers/MysqlDriver.ts b/src/drivers/MysqlDriver.ts index 9878739..a13225b 100644 --- a/src/drivers/MysqlDriver.ts +++ b/src/drivers/MysqlDriver.ts @@ -4,11 +4,11 @@ import * as TypeormDriver from "typeorm/driver/mysql/MysqlDriver"; import { DataTypeDefaults } from "typeorm/driver/types/DataTypeDefaults"; import * as TomgUtils from "../Utils"; import AbstractDriver from "./AbstractDriver"; -import EntityInfo from "../models/EntityInfo"; -import ColumnInfo from "../models/ColumnInfo"; -import IndexInfo from "../models/IndexInfo"; -import IndexColumnInfo from "../models/IndexColumnInfo"; -import RelationTempInfo from "../models/RelationTempInfo"; +import EntityInfo from "../oldModels/EntityInfo"; +import ColumnInfo from "../oldModels/ColumnInfo"; +import IndexInfo from "../oldModels/IndexInfo"; +import IndexColumnInfo from "../oldModels/IndexColumnInfo"; +import RelationTempInfo from "../oldModels/RelationTempInfo"; import IConnectionOptions from "../IConnectionOptions"; export default class MysqlDriver extends AbstractDriver { diff --git a/src/drivers/OracleDriver.ts b/src/drivers/OracleDriver.ts index 2c7a208..d757c20 100644 --- a/src/drivers/OracleDriver.ts +++ b/src/drivers/OracleDriver.ts @@ -2,11 +2,11 @@ import * as TypeormDriver from "typeorm/driver/oracle/OracleDriver"; import { DataTypeDefaults } from "typeorm/driver/types/DataTypeDefaults"; import * as TomgUtils from "../Utils"; import AbstractDriver from "./AbstractDriver"; -import EntityInfo from "../models/EntityInfo"; -import ColumnInfo from "../models/ColumnInfo"; -import IndexInfo from "../models/IndexInfo"; -import IndexColumnInfo from "../models/IndexColumnInfo"; -import RelationTempInfo from "../models/RelationTempInfo"; +import EntityInfo from "../oldModels/EntityInfo"; +import ColumnInfo from "../oldModels/ColumnInfo"; +import IndexInfo from "../oldModels/IndexInfo"; +import IndexColumnInfo from "../oldModels/IndexColumnInfo"; +import RelationTempInfo from "../oldModels/RelationTempInfo"; import IConnectionOptions from "../IConnectionOptions"; export default class OracleDriver extends AbstractDriver { diff --git a/src/drivers/PostgresDriver.ts b/src/drivers/PostgresDriver.ts index 9dbb560..0ed8c2e 100644 --- a/src/drivers/PostgresDriver.ts +++ b/src/drivers/PostgresDriver.ts @@ -4,11 +4,11 @@ import * as TypeormDriver from "typeorm/driver/postgres/PostgresDriver"; import { DataTypeDefaults } from "typeorm/driver/types/DataTypeDefaults"; import * as TomgUtils from "../Utils"; import AbstractDriver from "./AbstractDriver"; -import EntityInfo from "../models/EntityInfo"; -import ColumnInfo from "../models/ColumnInfo"; -import IndexInfo from "../models/IndexInfo"; -import IndexColumnInfo from "../models/IndexColumnInfo"; -import RelationTempInfo from "../models/RelationTempInfo"; +import EntityInfo from "../oldModels/EntityInfo"; +import ColumnInfo from "../oldModels/ColumnInfo"; +import IndexInfo from "../oldModels/IndexInfo"; +import IndexColumnInfo from "../oldModels/IndexColumnInfo"; +import RelationTempInfo from "../oldModels/RelationTempInfo"; import IConnectionOptions from "../IConnectionOptions"; export default class PostgresDriver extends AbstractDriver { diff --git a/src/drivers/SqliteDriver.ts b/src/drivers/SqliteDriver.ts index 5dbadc5..f5f57e8 100644 --- a/src/drivers/SqliteDriver.ts +++ b/src/drivers/SqliteDriver.ts @@ -4,11 +4,11 @@ import { DataTypeDefaults } from "typeorm/driver/types/DataTypeDefaults"; import * as sqliteLib from "sqlite3"; import * as TomgUtils from "../Utils"; import AbstractDriver from "./AbstractDriver"; -import EntityInfo from "../models/EntityInfo"; -import ColumnInfo from "../models/ColumnInfo"; -import IndexInfo from "../models/IndexInfo"; -import IndexColumnInfo from "../models/IndexColumnInfo"; -import RelationTempInfo from "../models/RelationTempInfo"; +import EntityInfo from "../oldModels/EntityInfo"; +import ColumnInfo from "../oldModels/ColumnInfo"; +import IndexInfo from "../oldModels/IndexInfo"; +import IndexColumnInfo from "../oldModels/IndexColumnInfo"; +import RelationTempInfo from "../oldModels/RelationTempInfo"; import IConnectionOptions from "../IConnectionOptions"; export default class SqliteDriver extends AbstractDriver { diff --git a/src/models/ColumnInfo.ts b/src/oldModels/ColumnInfo.ts similarity index 100% rename from src/models/ColumnInfo.ts rename to src/oldModels/ColumnInfo.ts diff --git a/src/models/EntityInfo.ts b/src/oldModels/EntityInfo.ts similarity index 100% rename from src/models/EntityInfo.ts rename to src/oldModels/EntityInfo.ts diff --git a/src/models/IndexColumnInfo.ts b/src/oldModels/IndexColumnInfo.ts similarity index 100% rename from src/models/IndexColumnInfo.ts rename to src/oldModels/IndexColumnInfo.ts diff --git a/src/models/IndexInfo.ts b/src/oldModels/IndexInfo.ts similarity index 100% rename from src/models/IndexInfo.ts rename to src/oldModels/IndexInfo.ts diff --git a/src/models/RelationInfo.ts b/src/oldModels/RelationInfo.ts similarity index 100% rename from src/models/RelationInfo.ts rename to src/oldModels/RelationInfo.ts diff --git a/src/models/RelationTempInfo.ts b/src/oldModels/RelationTempInfo.ts similarity index 100% rename from src/models/RelationTempInfo.ts rename to src/oldModels/RelationTempInfo.ts diff --git a/test/drivers/MssqlDriver.test.ts b/test/drivers/MssqlDriver.test.ts index 4a15204..2381625 100644 --- a/test/drivers/MssqlDriver.test.ts +++ b/test/drivers/MssqlDriver.test.ts @@ -2,10 +2,10 @@ import { expect } from "chai"; import * as MSSQL from "mssql"; import * as Sinon from "sinon"; import MssqlDriver from "../../src/drivers/MssqlDriver"; -import EntityInfo from "../../src/models/EntityInfo"; -import ColumnInfo from "../../src/models/ColumnInfo"; -import IndexInfo from "../../src/models/IndexInfo"; -import RelationInfo from "../../src/models/RelationInfo"; +import EntityInfo from "../../src/oldModels/EntityInfo"; +import ColumnInfo from "../../src/oldModels/ColumnInfo"; +import IndexInfo from "../../src/oldModels/IndexInfo"; +import RelationInfo from "../../src/oldModels/RelationInfo"; interface FakeResponse extends MSSQL.IResult { recordsets: MSSQL.IRecordSet[]; diff --git a/test/integration/runTestsFromPath.test.ts b/test/integration/runTestsFromPath.test.ts index 47674a5..24d9294 100644 --- a/test/integration/runTestsFromPath.test.ts +++ b/test/integration/runTestsFromPath.test.ts @@ -9,7 +9,7 @@ import { modelGenerationPhase } from "../../src/Engine"; import * as GTU from "../utils/GeneralTestUtils"; -import EntityInfo from "../../src/models/EntityInfo"; +import EntityInfo from "../../src/oldModels/EntityInfo"; import IConnectionOptions from "../../src/IConnectionOptions"; import fs = require("fs-extra");