@platform-modules/civil-aviation-authority 2.3.308 → 2.3.309
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/models/user.d.ts
CHANGED
package/dist/models/user.js
CHANGED
|
@@ -210,6 +210,10 @@ __decorate([
|
|
|
210
210
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
211
211
|
__metadata("design:type", String)
|
|
212
212
|
], User.prototype, "avatar", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
(0, typeorm_1.Column)({ type: "enum", enum: ["English", "Arabic"], nullable: false, default: "English" }),
|
|
215
|
+
__metadata("design:type", String)
|
|
216
|
+
], User.prototype, "is_selected_lang", void 0);
|
|
213
217
|
__decorate([
|
|
214
218
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
215
219
|
__metadata("design:type", String)
|
package/package.json
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
-- Add is_selected_lang column to users table (CAA).
|
|
2
|
+
-- Run once per environment before deploying updated services.
|
|
3
|
+
|
|
4
|
+
DO $$ BEGIN
|
|
5
|
+
CREATE TYPE is_selected_lang_enum AS ENUM ('English', 'Arabic');
|
|
6
|
+
EXCEPTION
|
|
7
|
+
WHEN duplicate_object THEN NULL;
|
|
8
|
+
END $$;
|
|
9
|
+
|
|
10
|
+
ALTER TABLE IF EXISTS users
|
|
11
|
+
ADD COLUMN IF NOT EXISTS is_selected_lang is_selected_lang_enum NOT NULL DEFAULT 'English';
|
package/src/models/user.ts
CHANGED
|
@@ -115,6 +115,9 @@ export class User extends BaseModel {
|
|
|
115
115
|
@Column({ nullable: true })
|
|
116
116
|
avatar?: string;
|
|
117
117
|
|
|
118
|
+
@Column({ type: "enum", enum: ["English", "Arabic"], nullable: false, default: "English" })
|
|
119
|
+
is_selected_lang: "English" | "Arabic";
|
|
120
|
+
|
|
118
121
|
@Column({ nullable: true })
|
|
119
122
|
father_name?: string;
|
|
120
123
|
|