typeorm 0.3.8-dev.dadb658 → 0.3.8-dev.eb8f0c6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,8 +12,8 @@ import { TableUnique } from "../../schema-builder/table/TableUnique";
12
12
  import { View } from "../../schema-builder/view/View";
13
13
  import { Query } from "../Query";
14
14
  import { IsolationLevel } from "../types/IsolationLevel";
15
- import { ReplicationMode } from "../types/ReplicationMode";
16
15
  import { PostgresDriver } from "./PostgresDriver";
16
+ import { ReplicationMode } from "../types/ReplicationMode";
17
17
  /**
18
18
  * Runs queries on a single postgres database connection.
19
19
  */
@@ -1,9 +1,7 @@
1
- import { TypeORMError } from "../../error";
2
1
  import { QueryFailedError } from "../../error/QueryFailedError";
3
2
  import { QueryRunnerAlreadyReleasedError } from "../../error/QueryRunnerAlreadyReleasedError";
4
3
  import { TransactionNotStartedError } from "../../error/TransactionNotStartedError";
5
4
  import { BaseQueryRunner } from "../../query-runner/BaseQueryRunner";
6
- import { QueryResult } from "../../query-runner/QueryResult";
7
5
  import { Table } from "../../schema-builder/table/Table";
8
6
  import { TableCheck } from "../../schema-builder/table/TableCheck";
9
7
  import { TableColumn } from "../../schema-builder/table/TableColumn";
@@ -13,11 +11,13 @@ import { TableIndex } from "../../schema-builder/table/TableIndex";
13
11
  import { TableUnique } from "../../schema-builder/table/TableUnique";
14
12
  import { View } from "../../schema-builder/view/View";
15
13
  import { Broadcaster } from "../../subscriber/Broadcaster";
16
- import { InstanceChecker } from "../../util/InstanceChecker";
17
14
  import { OrmUtils } from "../../util/OrmUtils";
18
- import { VersionUtils } from "../../util/VersionUtils";
19
15
  import { Query } from "../Query";
16
+ import { VersionUtils } from "../../util/VersionUtils";
17
+ import { TypeORMError } from "../../error";
18
+ import { QueryResult } from "../../query-runner/QueryResult";
20
19
  import { MetadataTableType } from "../types/MetadataTableType";
20
+ import { InstanceChecker } from "../../util/InstanceChecker";
21
21
  /**
22
22
  * Runs queries on a single postgres database connection.
23
23
  */
@@ -1944,14 +1944,8 @@ export class PostgresQueryRunner extends BaseQueryRunner {
1944
1944
  else if (dbColumn["column_default"] ===
1945
1945
  "gen_random_uuid()" ||
1946
1946
  /^uuid_generate_v\d\(\)/.test(dbColumn["column_default"])) {
1947
- if (tableColumn.type === "uuid") {
1948
- tableColumn.isGenerated = true;
1949
- tableColumn.generationStrategy = "uuid";
1950
- }
1951
- else {
1952
- tableColumn.default =
1953
- dbColumn["column_default"];
1954
- }
1947
+ tableColumn.isGenerated = true;
1948
+ tableColumn.generationStrategy = "uuid";
1955
1949
  }
1956
1950
  else if (dbColumn["column_default"] === "now()" ||
1957
1951
  dbColumn["column_default"].indexOf("'now'::text") !== -1) {