@aws-amplify/graphql-model-transformer 1.3.7 → 1.3.8
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.
- package/CHANGELOG.md +4 -0
- package/lib/definitions.d.ts.map +1 -1
- package/lib/definitions.js +28 -2
- package/lib/definitions.js.map +1 -1
- package/lib/graphql-model-transformer.d.ts.map +1 -1
- package/lib/graphql-model-transformer.js +37 -35
- package/lib/graphql-model-transformer.js.map +1 -1
- package/lib/graphql-types/common.d.ts.map +1 -1
- package/lib/graphql-types/common.js +16 -18
- package/lib/graphql-types/common.js.map +1 -1
- package/lib/graphql-types/mutation.js +12 -12
- package/lib/graphql-types/mutation.js.map +1 -1
- package/lib/rds-lambda.zip +0 -0
- package/lib/resolvers/common.d.ts.map +1 -1
- package/lib/resolvers/common.js.map +1 -1
- package/lib/resolvers/dynamodb/mutation.d.ts.map +1 -1
- package/lib/resolvers/dynamodb/mutation.js +10 -8
- package/lib/resolvers/dynamodb/mutation.js.map +1 -1
- package/lib/resolvers/dynamodb/query.d.ts.map +1 -1
- package/lib/resolvers/dynamodb/query.js +1 -4
- package/lib/resolvers/dynamodb/query.js.map +1 -1
- package/lib/resolvers/dynamodb/subscriptions.d.ts.map +1 -1
- package/lib/resolvers/dynamodb/subscriptions.js.map +1 -1
- package/lib/resolvers/generators/rds-vtl-generator.d.ts.map +1 -1
- package/lib/resolvers/generators/rds-vtl-generator.js.map +1 -1
- package/lib/resolvers/generators/vtl-generator.d.ts.map +1 -1
- package/lib/resolvers/index.d.ts.map +1 -1
- package/lib/resolvers/index.js.map +1 -1
- package/lib/resolvers/rds/mutation.d.ts.map +1 -1
- package/lib/resolvers/rds/mutation.js.map +1 -1
- package/lib/resolvers/rds/query.d.ts.map +1 -1
- package/lib/resolvers/rds/query.js.map +1 -1
- package/lib/resolvers/rds/resolver.d.ts.map +1 -1
- package/lib/resolvers/rds/resolver.js +1 -1
- package/lib/resolvers/rds/resolver.js.map +1 -1
- package/lib/resources/dynamo-model-resource-generator.d.ts.map +1 -1
- package/lib/resources/dynamo-model-resource-generator.js.map +1 -1
- package/lib/resources/model-resource-generator.d.ts.map +1 -1
- package/lib/resources/model-resource-generator.js +12 -4
- package/lib/resources/model-resource-generator.js.map +1 -1
- package/lib/resources/rds-model-resource-generator.d.ts.map +1 -1
- package/lib/resources/rds-model-resource-generator.js +1 -1
- package/lib/resources/rds-model-resource-generator.js.map +1 -1
- package/package.json +6 -6
- package/rds-lambda/node_modules/.package-lock.json +209 -221
- package/rds-lambda/node_modules/@aws-sdk/client-ssm/package.json +17 -18
- package/rds-lambda/node_modules/@aws-sdk/client-sso/package.json +14 -15
- package/rds-lambda/node_modules/@aws-sdk/client-sso-oidc/package.json +14 -15
- package/rds-lambda/node_modules/@aws-sdk/client-sts/package.json +17 -18
- package/rds-lambda/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/rds-lambda/node_modules/@aws-sdk/credential-provider-ini/package.json +6 -6
- package/rds-lambda/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/rds-lambda/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/rds-lambda/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/rds-lambda/node_modules/@aws-sdk/credential-provider-web-identity/package.json +2 -2
- package/rds-lambda/node_modules/@aws-sdk/middleware-host-header/package.json +2 -2
- package/rds-lambda/node_modules/@aws-sdk/middleware-logger/package.json +2 -2
- package/rds-lambda/node_modules/@aws-sdk/middleware-recursion-detection/package.json +2 -2
- package/rds-lambda/node_modules/@aws-sdk/middleware-sdk-sts/package.json +3 -3
- package/rds-lambda/node_modules/@aws-sdk/middleware-signing/package.json +2 -2
- package/rds-lambda/node_modules/@aws-sdk/middleware-user-agent/package.json +3 -3
- package/rds-lambda/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/rds-lambda/node_modules/@aws-sdk/types/package.json +2 -1
- package/rds-lambda/node_modules/@aws-sdk/util-endpoints/package.json +2 -2
- package/rds-lambda/node_modules/@aws-sdk/util-user-agent-browser/package.json +2 -2
- package/rds-lambda/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
- package/rds-lambda/node_modules/@babel/compat-data/data/plugin-bugfixes.json +2 -0
- package/rds-lambda/node_modules/@babel/compat-data/data/plugins.json +8 -0
- package/rds-lambda/node_modules/@babel/compat-data/package.json +1 -1
- package/rds-lambda/node_modules/@babel/core/package.json +7 -7
- package/rds-lambda/node_modules/@babel/generator/package.json +2 -2
- package/rds-lambda/node_modules/@babel/helper-compilation-targets/package.json +5 -5
- package/rds-lambda/node_modules/@babel/helper-module-transforms/README.md +1 -1
- package/rds-lambda/node_modules/@babel/helper-module-transforms/package.json +10 -6
- package/rds-lambda/node_modules/@types/jest/README.md +1 -1
- package/rds-lambda/node_modules/@types/jest/package.json +2 -2
- package/rds-lambda/node_modules/@types/node/README.md +1 -1
- package/rds-lambda/node_modules/@types/node/package.json +2 -2
- package/rds-lambda/node_modules/caniuse-lite/package.json +1 -1
- package/rds-lambda/node_modules/commander/Readme.md +7 -2
- package/rds-lambda/node_modules/commander/package.json +17 -17
- package/rds-lambda/node_modules/electron-to-chromium/full-chromium-versions.json +1 -1
- package/rds-lambda/node_modules/electron-to-chromium/full-versions.json +1 -1
- package/rds-lambda/node_modules/electron-to-chromium/package.json +1 -1
- package/rds-lambda/node_modules/electron-to-chromium/versions.json +1 -1
- package/rds-lambda/node_modules/knex/CHANGELOG.md +63 -21
- package/rds-lambda/node_modules/knex/CONTRIBUTING.md +1 -1
- package/rds-lambda/node_modules/knex/LICENSE +22 -22
- package/rds-lambda/node_modules/knex/README.md +32 -31
- package/rds-lambda/node_modules/knex/UPGRADING.md +94 -82
- package/rds-lambda/node_modules/knex/knex.mjs +11 -0
- package/rds-lambda/node_modules/knex/lib/dialects/oracle/DEAD_CODE.md +3 -3
- package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/cjs.stub +15 -15
- package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/coffee.stub +13 -13
- package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/eg.stub +14 -14
- package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/js-schema.stub +22 -22
- package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/js.stub +22 -22
- package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/knexfile-coffee.stub +34 -34
- package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/knexfile-eg.stub +43 -43
- package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/knexfile-js.stub +47 -47
- package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/knexfile-ls.stub +35 -35
- package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/knexfile-ts.stub +47 -47
- package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/ls.stub +14 -14
- package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/mjs.stub +23 -23
- package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/ts-schema.stub +21 -21
- package/rds-lambda/node_modules/knex/lib/migrations/migrate/stub/ts.stub +21 -21
- package/rds-lambda/node_modules/knex/lib/migrations/seed/stub/coffee.stub +9 -9
- package/rds-lambda/node_modules/knex/lib/migrations/seed/stub/eg.stub +11 -11
- package/rds-lambda/node_modules/knex/lib/migrations/seed/stub/js.stub +13 -13
- package/rds-lambda/node_modules/knex/lib/migrations/seed/stub/ls.stub +11 -11
- package/rds-lambda/node_modules/knex/lib/migrations/seed/stub/mjs.stub +12 -12
- package/rds-lambda/node_modules/knex/lib/migrations/seed/stub/ts.stub +13 -13
- package/rds-lambda/node_modules/knex/package.json +21 -18
- package/rds-lambda/node_modules/knex/scripts/docker-compose.yml +2 -2
- package/rds-lambda/node_modules/knex/scripts/next-release-howto.md +1 -1
- package/rds-lambda/node_modules/knex/scripts/oracledb-install-driver-libs.sh +82 -82
- package/rds-lambda/node_modules/knex/scripts/release.sh +36 -34
- package/rds-lambda/node_modules/knex/scripts/stress-test/README.txt +18 -18
- package/rds-lambda/node_modules/knex/scripts/stress-test/docker-compose.yml +16 -16
- package/rds-lambda/node_modules/pg-connection-string/package.json +2 -2
- package/rds-lambda/node_modules/semver/package.json +19 -9
- package/rds-lambda/package-lock.json +209 -221
- package/src/__tests__/model-transformer.test.ts +130 -139
- package/src/__tests__/test-utils/helpers.ts +1 -1
- package/src/__tests__/test-utils/rds_utils.test.ts +29 -68
- package/src/definitions.ts +28 -2
- package/src/graphql-model-transformer.ts +72 -74
- package/src/graphql-types/common.ts +41 -41
- package/src/graphql-types/mutation.ts +12 -12
- package/src/resolvers/common.ts +1 -12
- package/src/resolvers/dynamodb/mutation.ts +16 -13
- package/src/resolvers/dynamodb/query.ts +6 -12
- package/src/resolvers/dynamodb/subscriptions.ts +1 -3
- package/src/resolvers/generators/rds-vtl-generator.ts +1 -4
- package/src/resolvers/generators/vtl-generator.ts +5 -5
- package/src/resolvers/index.ts +1 -3
- package/src/resolvers/rds/mutation.ts +17 -6
- package/src/resolvers/rds/query.ts +4 -12
- package/src/resolvers/rds/resolver.ts +8 -13
- package/src/resources/dynamo-model-resource-generator.ts +12 -22
- package/src/resources/model-resource-generator.ts +54 -24
- package/src/resources/rds-model-resource-generator.ts +9 -23
- package/tsconfig.json +4 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/rds-lambda/node_modules/@nicolo-ribaudo/semver-v6/CHANGELOG.md +0 -70
- package/rds-lambda/node_modules/@nicolo-ribaudo/semver-v6/LICENSE +0 -15
- package/rds-lambda/node_modules/@nicolo-ribaudo/semver-v6/README.md +0 -454
- package/rds-lambda/node_modules/@nicolo-ribaudo/semver-v6/package.json +0 -28
- package/rds-lambda/node_modules/@nicolo-ribaudo/semver-v6/range.bnf +0 -16
- package/rds-lambda/node_modules/pg/node_modules/pg-connection-string/LICENSE +0 -21
- package/rds-lambda/node_modules/pg/node_modules/pg-connection-string/README.md +0 -77
- package/rds-lambda/node_modules/pg/node_modules/pg-connection-string/package.json +0 -40
- package/rds-lambda/node_modules/semver/CHANGELOG.md +0 -70
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
;; Update with your config settings.
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
development = {
|
|
5
|
-
client = 'sqlite3'
|
|
6
|
-
connection = {
|
|
7
|
-
filename = './dev.sqlite3'
|
|
8
|
-
}
|
|
9
|
-
migrations = {
|
|
10
|
-
tableName = 'knex_migrations'
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
staging = {
|
|
14
|
-
client = 'postgresql'
|
|
15
|
-
connection = {
|
|
16
|
-
database = 'my_db'
|
|
17
|
-
user = 'username'
|
|
18
|
-
password = 'password'
|
|
19
|
-
}
|
|
20
|
-
pool = {
|
|
21
|
-
min = 2
|
|
22
|
-
max = 10
|
|
23
|
-
}
|
|
24
|
-
migrations = {
|
|
25
|
-
tableName = 'knex_migrations'
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
production = {
|
|
29
|
-
client = 'postgresql'
|
|
30
|
-
connection = {
|
|
31
|
-
database = 'my_db'
|
|
32
|
-
user = 'username'
|
|
33
|
-
password = 'password'
|
|
34
|
-
}
|
|
35
|
-
pool = {
|
|
36
|
-
min = 2
|
|
37
|
-
max = 10
|
|
38
|
-
}
|
|
39
|
-
migrations = {
|
|
40
|
-
tableName = 'knex_migrations'
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
1
|
+
;; Update with your config settings.
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
development = {
|
|
5
|
+
client = 'sqlite3'
|
|
6
|
+
connection = {
|
|
7
|
+
filename = './dev.sqlite3'
|
|
8
|
+
}
|
|
9
|
+
migrations = {
|
|
10
|
+
tableName = 'knex_migrations'
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
staging = {
|
|
14
|
+
client = 'postgresql'
|
|
15
|
+
connection = {
|
|
16
|
+
database = 'my_db'
|
|
17
|
+
user = 'username'
|
|
18
|
+
password = 'password'
|
|
19
|
+
}
|
|
20
|
+
pool = {
|
|
21
|
+
min = 2
|
|
22
|
+
max = 10
|
|
23
|
+
}
|
|
24
|
+
migrations = {
|
|
25
|
+
tableName = 'knex_migrations'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
production = {
|
|
29
|
+
client = 'postgresql'
|
|
30
|
+
connection = {
|
|
31
|
+
database = 'my_db'
|
|
32
|
+
user = 'username'
|
|
33
|
+
password = 'password'
|
|
34
|
+
}
|
|
35
|
+
pool = {
|
|
36
|
+
min = 2
|
|
37
|
+
max = 10
|
|
38
|
+
}
|
|
39
|
+
migrations = {
|
|
40
|
+
tableName = 'knex_migrations'
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
// Update with your config settings.
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @type { Object.<string, import("knex").Knex.Config> }
|
|
5
|
-
*/
|
|
6
|
-
module.exports = {
|
|
7
|
-
|
|
8
|
-
development: {
|
|
9
|
-
client: 'sqlite3',
|
|
10
|
-
connection: {
|
|
11
|
-
filename: './dev.sqlite3'
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
staging: {
|
|
16
|
-
client: 'postgresql',
|
|
17
|
-
connection: {
|
|
18
|
-
database: 'my_db',
|
|
19
|
-
user: 'username',
|
|
20
|
-
password: 'password'
|
|
21
|
-
},
|
|
22
|
-
pool: {
|
|
23
|
-
min: 2,
|
|
24
|
-
max: 10
|
|
25
|
-
},
|
|
26
|
-
migrations: {
|
|
27
|
-
tableName: 'knex_migrations'
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
production: {
|
|
32
|
-
client: 'postgresql',
|
|
33
|
-
connection: {
|
|
34
|
-
database: 'my_db',
|
|
35
|
-
user: 'username',
|
|
36
|
-
password: 'password'
|
|
37
|
-
},
|
|
38
|
-
pool: {
|
|
39
|
-
min: 2,
|
|
40
|
-
max: 10
|
|
41
|
-
},
|
|
42
|
-
migrations: {
|
|
43
|
-
tableName: 'knex_migrations'
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
};
|
|
1
|
+
// Update with your config settings.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @type { Object.<string, import("knex").Knex.Config> }
|
|
5
|
+
*/
|
|
6
|
+
module.exports = {
|
|
7
|
+
|
|
8
|
+
development: {
|
|
9
|
+
client: 'sqlite3',
|
|
10
|
+
connection: {
|
|
11
|
+
filename: './dev.sqlite3'
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
staging: {
|
|
16
|
+
client: 'postgresql',
|
|
17
|
+
connection: {
|
|
18
|
+
database: 'my_db',
|
|
19
|
+
user: 'username',
|
|
20
|
+
password: 'password'
|
|
21
|
+
},
|
|
22
|
+
pool: {
|
|
23
|
+
min: 2,
|
|
24
|
+
max: 10
|
|
25
|
+
},
|
|
26
|
+
migrations: {
|
|
27
|
+
tableName: 'knex_migrations'
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
production: {
|
|
32
|
+
client: 'postgresql',
|
|
33
|
+
connection: {
|
|
34
|
+
database: 'my_db',
|
|
35
|
+
user: 'username',
|
|
36
|
+
password: 'password'
|
|
37
|
+
},
|
|
38
|
+
pool: {
|
|
39
|
+
min: 2,
|
|
40
|
+
max: 10
|
|
41
|
+
},
|
|
42
|
+
migrations: {
|
|
43
|
+
tableName: 'knex_migrations'
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
# Update with your config settings.
|
|
2
|
-
|
|
3
|
-
module.exports =
|
|
4
|
-
|
|
5
|
-
development:
|
|
6
|
-
client: 'sqlite3'
|
|
7
|
-
connection:
|
|
8
|
-
filename: './dev.sqlite3'
|
|
9
|
-
migrations:
|
|
10
|
-
tableName: 'knex_migrations'
|
|
11
|
-
|
|
12
|
-
staging:
|
|
13
|
-
client: 'postgresql'
|
|
14
|
-
connection:
|
|
15
|
-
database: 'my_db'
|
|
16
|
-
user: 'username'
|
|
17
|
-
password: 'password'
|
|
18
|
-
pool:
|
|
19
|
-
min: 2
|
|
20
|
-
max: 10
|
|
21
|
-
migrations:
|
|
22
|
-
tableName: 'knex_migrations'
|
|
23
|
-
|
|
24
|
-
production:
|
|
25
|
-
client: 'postgresql'
|
|
26
|
-
connection:
|
|
27
|
-
database: 'my_db'
|
|
28
|
-
user: 'username'
|
|
29
|
-
password: 'password'
|
|
30
|
-
pool:
|
|
31
|
-
min: 2
|
|
32
|
-
max: 10
|
|
33
|
-
migrations:
|
|
34
|
-
tableName: 'knex_migrations'
|
|
35
|
-
|
|
1
|
+
# Update with your config settings.
|
|
2
|
+
|
|
3
|
+
module.exports =
|
|
4
|
+
|
|
5
|
+
development:
|
|
6
|
+
client: 'sqlite3'
|
|
7
|
+
connection:
|
|
8
|
+
filename: './dev.sqlite3'
|
|
9
|
+
migrations:
|
|
10
|
+
tableName: 'knex_migrations'
|
|
11
|
+
|
|
12
|
+
staging:
|
|
13
|
+
client: 'postgresql'
|
|
14
|
+
connection:
|
|
15
|
+
database: 'my_db'
|
|
16
|
+
user: 'username'
|
|
17
|
+
password: 'password'
|
|
18
|
+
pool:
|
|
19
|
+
min: 2
|
|
20
|
+
max: 10
|
|
21
|
+
migrations:
|
|
22
|
+
tableName: 'knex_migrations'
|
|
23
|
+
|
|
24
|
+
production:
|
|
25
|
+
client: 'postgresql'
|
|
26
|
+
connection:
|
|
27
|
+
database: 'my_db'
|
|
28
|
+
user: 'username'
|
|
29
|
+
password: 'password'
|
|
30
|
+
pool:
|
|
31
|
+
min: 2
|
|
32
|
+
max: 10
|
|
33
|
+
migrations:
|
|
34
|
+
tableName: 'knex_migrations'
|
|
35
|
+
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import type { Knex } from "knex";
|
|
2
|
-
|
|
3
|
-
// Update with your config settings.
|
|
4
|
-
|
|
5
|
-
const config: { [key: string]: Knex.Config } = {
|
|
6
|
-
development: {
|
|
7
|
-
client: "sqlite3",
|
|
8
|
-
connection: {
|
|
9
|
-
filename: "./dev.sqlite3"
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
staging: {
|
|
14
|
-
client: "postgresql",
|
|
15
|
-
connection: {
|
|
16
|
-
database: "my_db",
|
|
17
|
-
user: "username",
|
|
18
|
-
password: "password"
|
|
19
|
-
},
|
|
20
|
-
pool: {
|
|
21
|
-
min: 2,
|
|
22
|
-
max: 10
|
|
23
|
-
},
|
|
24
|
-
migrations: {
|
|
25
|
-
tableName: "knex_migrations"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
production: {
|
|
30
|
-
client: "postgresql",
|
|
31
|
-
connection: {
|
|
32
|
-
database: "my_db",
|
|
33
|
-
user: "username",
|
|
34
|
-
password: "password"
|
|
35
|
-
},
|
|
36
|
-
pool: {
|
|
37
|
-
min: 2,
|
|
38
|
-
max: 10
|
|
39
|
-
},
|
|
40
|
-
migrations: {
|
|
41
|
-
tableName: "knex_migrations"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
module.exports = config;
|
|
1
|
+
import type { Knex } from "knex";
|
|
2
|
+
|
|
3
|
+
// Update with your config settings.
|
|
4
|
+
|
|
5
|
+
const config: { [key: string]: Knex.Config } = {
|
|
6
|
+
development: {
|
|
7
|
+
client: "sqlite3",
|
|
8
|
+
connection: {
|
|
9
|
+
filename: "./dev.sqlite3"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
staging: {
|
|
14
|
+
client: "postgresql",
|
|
15
|
+
connection: {
|
|
16
|
+
database: "my_db",
|
|
17
|
+
user: "username",
|
|
18
|
+
password: "password"
|
|
19
|
+
},
|
|
20
|
+
pool: {
|
|
21
|
+
min: 2,
|
|
22
|
+
max: 10
|
|
23
|
+
},
|
|
24
|
+
migrations: {
|
|
25
|
+
tableName: "knex_migrations"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
production: {
|
|
30
|
+
client: "postgresql",
|
|
31
|
+
connection: {
|
|
32
|
+
database: "my_db",
|
|
33
|
+
user: "username",
|
|
34
|
+
password: "password"
|
|
35
|
+
},
|
|
36
|
+
pool: {
|
|
37
|
+
min: 2,
|
|
38
|
+
max: 10
|
|
39
|
+
},
|
|
40
|
+
migrations: {
|
|
41
|
+
tableName: "knex_migrations"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
module.exports = config;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
exports.up = (knex, Promise) ->
|
|
3
|
-
<% if (d.tableName) { %>
|
|
4
|
-
knex.schema.create-table "<%= d.tableName %>", (t) ->
|
|
5
|
-
t.increments!
|
|
6
|
-
t.timestamp!
|
|
7
|
-
<% } %>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.down = (knex, Promise) ->
|
|
11
|
-
<% if (d.tableName) { %>
|
|
12
|
-
knex.schema.drop-table "<%= d.tableName %>"
|
|
13
|
-
<% } %>
|
|
14
|
-
|
|
1
|
+
|
|
2
|
+
exports.up = (knex, Promise) ->
|
|
3
|
+
<% if (d.tableName) { %>
|
|
4
|
+
knex.schema.create-table "<%= d.tableName %>", (t) ->
|
|
5
|
+
t.increments!
|
|
6
|
+
t.timestamp!
|
|
7
|
+
<% } %>
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.down = (knex, Promise) ->
|
|
11
|
+
<% if (d.tableName) { %>
|
|
12
|
+
knex.schema.drop-table "<%= d.tableName %>"
|
|
13
|
+
<% } %>
|
|
14
|
+
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @param { import("knex").Knex } knex
|
|
4
|
-
* @returns { Promise<void> }
|
|
5
|
-
*/
|
|
6
|
-
export const up = async (knex) => {
|
|
7
|
-
<% if (d.tableName) { %>
|
|
8
|
-
await knex.schema.createTable("<%= d.tableName %>", function(t) {
|
|
9
|
-
t.increments();
|
|
10
|
-
t.timestamp();
|
|
11
|
-
});
|
|
12
|
-
<% } %>
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @param { import("knex").Knex } knex
|
|
17
|
-
* @returns { Promise<void> }
|
|
18
|
-
*/
|
|
19
|
-
export const down = async (knex) => {
|
|
20
|
-
<% if (d.tableName) { %>
|
|
21
|
-
await knex.schema.dropTable("<%= d.tableName %>");
|
|
22
|
-
<% } %>
|
|
23
|
-
};
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @param { import("knex").Knex } knex
|
|
4
|
+
* @returns { Promise<void> }
|
|
5
|
+
*/
|
|
6
|
+
export const up = async (knex) => {
|
|
7
|
+
<% if (d.tableName) { %>
|
|
8
|
+
await knex.schema.createTable("<%= d.tableName %>", function(t) {
|
|
9
|
+
t.increments();
|
|
10
|
+
t.timestamp();
|
|
11
|
+
});
|
|
12
|
+
<% } %>
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @param { import("knex").Knex } knex
|
|
17
|
+
* @returns { Promise<void> }
|
|
18
|
+
*/
|
|
19
|
+
export const down = async (knex) => {
|
|
20
|
+
<% if (d.tableName) { %>
|
|
21
|
+
await knex.schema.dropTable("<%= d.tableName %>");
|
|
22
|
+
<% } %>
|
|
23
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { Knex } from "knex";
|
|
2
|
-
|
|
3
|
-
<% if (d.tableName) { %>
|
|
4
|
-
export async function up({schema}: Knex): Promise<Knex.SchemaBuilder> {
|
|
5
|
-
return schema.createTable("<%= d.tableName %>", (t) => {
|
|
6
|
-
t.increments();
|
|
7
|
-
t.timestamps();
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
<% } else { %>
|
|
11
|
-
export async function up({schema}: Knex): Promise<void> {
|
|
12
|
-
}
|
|
13
|
-
<% } %>
|
|
14
|
-
<% if (d.tableName) { %>
|
|
15
|
-
export async function down({schema}: Knex): Promise<Knex.SchemaBuilder> {
|
|
16
|
-
return schema.dropTable("<%= d.tableName %>");
|
|
17
|
-
}
|
|
18
|
-
<% } else { %>
|
|
19
|
-
export async function down({schema}: Knex): Promise<void> {
|
|
20
|
-
}
|
|
21
|
-
<% } %>
|
|
1
|
+
import { Knex } from "knex";
|
|
2
|
+
|
|
3
|
+
<% if (d.tableName) { %>
|
|
4
|
+
export async function up({schema}: Knex): Promise<Knex.SchemaBuilder> {
|
|
5
|
+
return schema.createTable("<%= d.tableName %>", (t) => {
|
|
6
|
+
t.increments();
|
|
7
|
+
t.timestamps();
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
<% } else { %>
|
|
11
|
+
export async function up({schema}: Knex): Promise<void> {
|
|
12
|
+
}
|
|
13
|
+
<% } %>
|
|
14
|
+
<% if (d.tableName) { %>
|
|
15
|
+
export async function down({schema}: Knex): Promise<Knex.SchemaBuilder> {
|
|
16
|
+
return schema.dropTable("<%= d.tableName %>");
|
|
17
|
+
}
|
|
18
|
+
<% } else { %>
|
|
19
|
+
export async function down({schema}: Knex): Promise<void> {
|
|
20
|
+
}
|
|
21
|
+
<% } %>
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { Knex } from "knex";
|
|
2
|
-
|
|
3
|
-
<% if (d.tableName) { %>
|
|
4
|
-
export async function up(knex: Knex): Promise<Knex.SchemaBuilder> {
|
|
5
|
-
return knex.schema.createTable("<%= d.tableName %>", (t) => {
|
|
6
|
-
t.increments();
|
|
7
|
-
t.timestamps();
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
<% } else { %>
|
|
11
|
-
export async function up(knex: Knex): Promise<void> {
|
|
12
|
-
}
|
|
13
|
-
<% } %>
|
|
14
|
-
<% if (d.tableName) { %>
|
|
15
|
-
export async function down(knex: Knex): Promise<Knex.SchemaBuilder> {
|
|
16
|
-
return knex.schema.dropTable("<%= d.tableName %>");
|
|
17
|
-
}
|
|
18
|
-
<% } else { %>
|
|
19
|
-
export async function down(knex: Knex): Promise<void> {
|
|
20
|
-
}
|
|
21
|
-
<% } %>
|
|
1
|
+
import { Knex } from "knex";
|
|
2
|
+
|
|
3
|
+
<% if (d.tableName) { %>
|
|
4
|
+
export async function up(knex: Knex): Promise<Knex.SchemaBuilder> {
|
|
5
|
+
return knex.schema.createTable("<%= d.tableName %>", (t) => {
|
|
6
|
+
t.increments();
|
|
7
|
+
t.timestamps();
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
<% } else { %>
|
|
11
|
+
export async function up(knex: Knex): Promise<void> {
|
|
12
|
+
}
|
|
13
|
+
<% } %>
|
|
14
|
+
<% if (d.tableName) { %>
|
|
15
|
+
export async function down(knex: Knex): Promise<Knex.SchemaBuilder> {
|
|
16
|
+
return knex.schema.dropTable("<%= d.tableName %>");
|
|
17
|
+
}
|
|
18
|
+
<% } else { %>
|
|
19
|
+
export async function down(knex: Knex): Promise<void> {
|
|
20
|
+
}
|
|
21
|
+
<% } %>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
exports.seed = (knex) ->
|
|
2
|
-
knex('table_name').del()
|
|
3
|
-
.then () ->
|
|
4
|
-
# Inserts seed entries
|
|
5
|
-
knex('table_name').insert([
|
|
6
|
-
{id: 1, colName: 'rowValue'}
|
|
7
|
-
{id: 2, colName: 'rowValue2'}
|
|
8
|
-
{id: 3, colName: 'rowValue3'}
|
|
9
|
-
])
|
|
1
|
+
exports.seed = (knex) ->
|
|
2
|
+
knex('table_name').del()
|
|
3
|
+
.then () ->
|
|
4
|
+
# Inserts seed entries
|
|
5
|
+
knex('table_name').insert([
|
|
6
|
+
{id: 1, colName: 'rowValue'}
|
|
7
|
+
{id: 2, colName: 'rowValue2'}
|
|
8
|
+
{id: 3, colName: 'rowValue3'}
|
|
9
|
+
])
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
provide: seed
|
|
2
|
-
seed = (knex) ->
|
|
3
|
-
;; Deletes ALL existing entries
|
|
4
|
-
knex(.table_name).del()
|
|
5
|
-
.then(() ->
|
|
6
|
-
;; Inserts seed entries
|
|
7
|
-
knex(.table_name).insert with [
|
|
8
|
-
{ id = 1, col-name = .row-value-1 }
|
|
9
|
-
{ id = 2, col-name = .row-value-2 }
|
|
10
|
-
{ id = 3, col-name = .row-value-3 }
|
|
11
|
-
]
|
|
1
|
+
provide: seed
|
|
2
|
+
seed = (knex) ->
|
|
3
|
+
;; Deletes ALL existing entries
|
|
4
|
+
knex(.table_name).del()
|
|
5
|
+
.then(() ->
|
|
6
|
+
;; Inserts seed entries
|
|
7
|
+
knex(.table_name).insert with [
|
|
8
|
+
{ id = 1, col-name = .row-value-1 }
|
|
9
|
+
{ id = 2, col-name = .row-value-2 }
|
|
10
|
+
{ id = 3, col-name = .row-value-3 }
|
|
11
|
+
]
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param { import("knex").Knex } knex
|
|
3
|
-
* @returns { Promise<void> }
|
|
4
|
-
*/
|
|
5
|
-
exports.seed = async function(knex) {
|
|
6
|
-
// Deletes ALL existing entries
|
|
7
|
-
await knex('table_name').del()
|
|
8
|
-
await knex('table_name').insert([
|
|
9
|
-
{id: 1, colName: 'rowValue1'},
|
|
10
|
-
{id: 2, colName: 'rowValue2'},
|
|
11
|
-
{id: 3, colName: 'rowValue3'}
|
|
12
|
-
]);
|
|
13
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* @param { import("knex").Knex } knex
|
|
3
|
+
* @returns { Promise<void> }
|
|
4
|
+
*/
|
|
5
|
+
exports.seed = async function(knex) {
|
|
6
|
+
// Deletes ALL existing entries
|
|
7
|
+
await knex('table_name').del()
|
|
8
|
+
await knex('table_name').insert([
|
|
9
|
+
{id: 1, colName: 'rowValue1'},
|
|
10
|
+
{id: 2, colName: 'rowValue2'},
|
|
11
|
+
{id: 3, colName: 'rowValue3'}
|
|
12
|
+
]);
|
|
13
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
exports.seed = (knex) ->
|
|
2
|
-
# Deletes ALL existing entries
|
|
3
|
-
knex('table_name').del()
|
|
4
|
-
.then(() ->
|
|
5
|
-
# Inserts seed entries
|
|
6
|
-
knex('table_name').insert([
|
|
7
|
-
{id: 1, colName: 'rowValue1'},
|
|
8
|
-
{id: 2, colName: 'rowValue2'},
|
|
9
|
-
{id: 3, colName: 'rowValue3'}
|
|
10
|
-
])
|
|
11
|
-
)
|
|
1
|
+
exports.seed = (knex) ->
|
|
2
|
+
# Deletes ALL existing entries
|
|
3
|
+
knex('table_name').del()
|
|
4
|
+
.then(() ->
|
|
5
|
+
# Inserts seed entries
|
|
6
|
+
knex('table_name').insert([
|
|
7
|
+
{id: 1, colName: 'rowValue1'},
|
|
8
|
+
{id: 2, colName: 'rowValue2'},
|
|
9
|
+
{id: 3, colName: 'rowValue3'}
|
|
10
|
+
])
|
|
11
|
+
)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
export const seed = async (knex) => {
|
|
3
|
-
// Deletes ALL existing entries
|
|
4
|
-
await knex('table_name').del();
|
|
5
|
-
|
|
6
|
-
// Inserts seed entries
|
|
7
|
-
await knex('table_name').insert([
|
|
8
|
-
{id: 1, colName: 'rowValue1'},
|
|
9
|
-
{id: 2, colName: 'rowValue2'},
|
|
10
|
-
{id: 3, colName: 'rowValue3'}
|
|
11
|
-
]);
|
|
12
|
-
};
|
|
1
|
+
|
|
2
|
+
export const seed = async (knex) => {
|
|
3
|
+
// Deletes ALL existing entries
|
|
4
|
+
await knex('table_name').del();
|
|
5
|
+
|
|
6
|
+
// Inserts seed entries
|
|
7
|
+
await knex('table_name').insert([
|
|
8
|
+
{id: 1, colName: 'rowValue1'},
|
|
9
|
+
{id: 2, colName: 'rowValue2'},
|
|
10
|
+
{id: 3, colName: 'rowValue3'}
|
|
11
|
+
]);
|
|
12
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Knex } from "knex";
|
|
2
|
-
|
|
3
|
-
export async function seed(knex: Knex): Promise<void> {
|
|
4
|
-
// Deletes ALL existing entries
|
|
5
|
-
await knex("table_name").del();
|
|
6
|
-
|
|
7
|
-
// Inserts seed entries
|
|
8
|
-
await knex("table_name").insert([
|
|
9
|
-
{ id: 1, colName: "rowValue1" },
|
|
10
|
-
{ id: 2, colName: "rowValue2" },
|
|
11
|
-
{ id: 3, colName: "rowValue3" }
|
|
12
|
-
]);
|
|
13
|
-
};
|
|
1
|
+
import { Knex } from "knex";
|
|
2
|
+
|
|
3
|
+
export async function seed(knex: Knex): Promise<void> {
|
|
4
|
+
// Deletes ALL existing entries
|
|
5
|
+
await knex("table_name").del();
|
|
6
|
+
|
|
7
|
+
// Inserts seed entries
|
|
8
|
+
await knex("table_name").insert([
|
|
9
|
+
{ id: 1, colName: "rowValue1" },
|
|
10
|
+
{ id: 2, colName: "rowValue2" },
|
|
11
|
+
{ id: 3, colName: "rowValue3" }
|
|
12
|
+
]);
|
|
13
|
+
};
|