@felloh-org/lambda-wrapper 1.1.22 → 1.1.23
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/dist/entity/token/token/index.js +20 -4
- package/dist/entity/user/user/index.js +6 -3
- package/dist/migration/token/1656064704919-token_entity_timezones.js +21 -0
- package/dist/migration/{1656063685417-nullable_user_names.js → user/1656063685417-nullable_user_names.js} +0 -0
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ var _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
|
13
13
|
|
|
14
14
|
var _user = _interopRequireDefault(require("../../user/user"));
|
|
15
15
|
|
|
16
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9;
|
|
16
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
@@ -44,7 +44,16 @@ let Token = (_dec = (0, _typeorm.Entity)({
|
|
|
44
44
|
}), _dec9 = (0, _typeorm.ManyToOne)(() => _user.default), _dec10 = (0, _typeorm.JoinColumn)({
|
|
45
45
|
name: 'user_id',
|
|
46
46
|
referencedColumnName: 'id'
|
|
47
|
-
}), _dec11 = (0, _typeorm.CreateDateColumn)(
|
|
47
|
+
}), _dec11 = (0, _typeorm.CreateDateColumn)({
|
|
48
|
+
type: 'timestamp with time zone',
|
|
49
|
+
default: () => 'NOW()'
|
|
50
|
+
}), _dec12 = (0, _typeorm.UpdateDateColumn)({
|
|
51
|
+
type: 'timestamp with time zone',
|
|
52
|
+
default: () => 'NOW()'
|
|
53
|
+
}), _dec13 = (0, _typeorm.DeleteDateColumn)({
|
|
54
|
+
type: 'timestamp with time zone',
|
|
55
|
+
nullable: true
|
|
56
|
+
}), _dec(_class = (_class2 = class Token {
|
|
48
57
|
constructor() {
|
|
49
58
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
50
59
|
|
|
@@ -62,7 +71,9 @@ let Token = (_dec = (0, _typeorm.Entity)({
|
|
|
62
71
|
|
|
63
72
|
_initializerDefineProperty(this, "created_at", _descriptor8, this);
|
|
64
73
|
|
|
65
|
-
_initializerDefineProperty(this, "
|
|
74
|
+
_initializerDefineProperty(this, "updated_at", _descriptor9, this);
|
|
75
|
+
|
|
76
|
+
_initializerDefineProperty(this, "deleted_at", _descriptor10, this);
|
|
66
77
|
}
|
|
67
78
|
|
|
68
79
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
@@ -119,7 +130,12 @@ let Token = (_dec = (0, _typeorm.Entity)({
|
|
|
119
130
|
enumerable: true,
|
|
120
131
|
writable: true,
|
|
121
132
|
initializer: null
|
|
122
|
-
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
133
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec12], {
|
|
134
|
+
configurable: true,
|
|
135
|
+
enumerable: true,
|
|
136
|
+
writable: true,
|
|
137
|
+
initializer: null
|
|
138
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec13], {
|
|
123
139
|
configurable: true,
|
|
124
140
|
enumerable: true,
|
|
125
141
|
writable: true,
|
|
@@ -53,11 +53,14 @@ let User = (_dec = (0, _typeorm.Entity)({
|
|
|
53
53
|
length: "50",
|
|
54
54
|
nullable: true
|
|
55
55
|
}), _dec10 = (0, _typeorm.CreateDateColumn)({
|
|
56
|
-
type: 'timestamp with time zone'
|
|
56
|
+
type: 'timestamp with time zone',
|
|
57
|
+
default: () => 'NOW()'
|
|
57
58
|
}), _dec11 = (0, _typeorm.UpdateDateColumn)({
|
|
58
|
-
type: 'timestamp with time zone'
|
|
59
|
+
type: 'timestamp with time zone',
|
|
60
|
+
default: () => 'NOW()'
|
|
59
61
|
}), _dec12 = (0, _typeorm.DeleteDateColumn)({
|
|
60
|
-
type: 'timestamp with time zone'
|
|
62
|
+
type: 'timestamp with time zone',
|
|
63
|
+
nullable: true
|
|
61
64
|
}), _dec13 = (0, _typeorm.ManyToMany)(() => _organisation.default, organisation => organisation.users), _dec14 = (0, _typeorm.JoinTable)({
|
|
62
65
|
name: "user_organisation",
|
|
63
66
|
schema: "user",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class tokenEntityTimezones1656064704919 {
|
|
4
|
+
name = 'tokenEntityTimezones1656064704919'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "token"."token" ADD "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "token"."token" DROP COLUMN "created_at"`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "token"."token" ADD "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "token"."token" DROP COLUMN "deleted_at"`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "token"."token" ADD "deleted_at" TIMESTAMP WITH TIME ZONE`);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async down(queryRunner) {
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "token"."token" DROP COLUMN "deleted_at"`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "token"."token" ADD "deleted_at" TIMESTAMP`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "token"."token" DROP COLUMN "created_at"`);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE "token"."token" ADD "created_at" TIMESTAMP NOT NULL DEFAULT now()`);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE "token"."token" DROP COLUMN "updated_at"`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
File without changes
|