clhq-postgres-module 1.1.0-alpha.183 → 1.1.0-alpha.185
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.
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateAgentJobsTable1713000055 = void 0;
|
|
4
|
+
const typeorm_1 = require("typeorm");
|
|
5
|
+
class CreateAgentJobsTable1713000055 {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.name = 'CreateAgentJobsTable1713000055';
|
|
8
|
+
}
|
|
9
|
+
async up(queryRunner) {
|
|
10
|
+
await queryRunner.createTable(new typeorm_1.Table({
|
|
11
|
+
name: 'agent_jobs',
|
|
12
|
+
columns: [
|
|
13
|
+
{
|
|
14
|
+
name: 'id',
|
|
15
|
+
type: 'uuid',
|
|
16
|
+
isPrimary: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'user_id',
|
|
20
|
+
type: 'uuid',
|
|
21
|
+
isNullable: false,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'agent_type',
|
|
25
|
+
type: 'varchar',
|
|
26
|
+
length: '50',
|
|
27
|
+
isNullable: false,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'status',
|
|
31
|
+
type: 'enum',
|
|
32
|
+
enum: ['pending', 'analyzing', 'planning', 'generating', 'assembling', 'completed', 'failed', 'cancelled'],
|
|
33
|
+
default: "'pending'",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'progress',
|
|
37
|
+
type: 'integer',
|
|
38
|
+
default: 0,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'current_stage',
|
|
42
|
+
type: 'varchar',
|
|
43
|
+
length: '100',
|
|
44
|
+
isNullable: true,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'prompt',
|
|
48
|
+
type: 'text',
|
|
49
|
+
isNullable: false,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'input_images',
|
|
53
|
+
type: 'jsonb',
|
|
54
|
+
default: "'[]'",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'input_videos',
|
|
58
|
+
type: 'jsonb',
|
|
59
|
+
default: "'[]'",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'duration',
|
|
63
|
+
type: 'integer',
|
|
64
|
+
isNullable: false,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'aspect_ratio',
|
|
68
|
+
type: 'varchar',
|
|
69
|
+
length: '10',
|
|
70
|
+
isNullable: false,
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'language',
|
|
74
|
+
type: 'varchar',
|
|
75
|
+
length: '10',
|
|
76
|
+
default: "'en'",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'style',
|
|
80
|
+
type: 'varchar',
|
|
81
|
+
length: '50',
|
|
82
|
+
default: "'cinematic'",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'voice_enabled',
|
|
86
|
+
type: 'boolean',
|
|
87
|
+
default: true,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'voice_id',
|
|
91
|
+
type: 'varchar',
|
|
92
|
+
length: '100',
|
|
93
|
+
isNullable: true,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'project_id',
|
|
97
|
+
type: 'varchar',
|
|
98
|
+
length: '255',
|
|
99
|
+
isNullable: true,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'project_title',
|
|
103
|
+
type: 'varchar',
|
|
104
|
+
length: '255',
|
|
105
|
+
isNullable: true,
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: 'error_message',
|
|
109
|
+
type: 'text',
|
|
110
|
+
isNullable: true,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: 'stage_log',
|
|
114
|
+
type: 'jsonb',
|
|
115
|
+
default: "'[]'",
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: 'created_at',
|
|
119
|
+
type: 'timestamp',
|
|
120
|
+
default: 'NOW()',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: 'updated_at',
|
|
124
|
+
type: 'timestamp',
|
|
125
|
+
default: 'NOW()',
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
}), true);
|
|
129
|
+
await queryRunner.createIndex('agent_jobs', new typeorm_1.TableIndex({
|
|
130
|
+
name: 'IDX_agent_jobs_user_id',
|
|
131
|
+
columnNames: ['user_id'],
|
|
132
|
+
}));
|
|
133
|
+
await queryRunner.createIndex('agent_jobs', new typeorm_1.TableIndex({
|
|
134
|
+
name: 'IDX_agent_jobs_status',
|
|
135
|
+
columnNames: ['status'],
|
|
136
|
+
}));
|
|
137
|
+
await queryRunner.createIndex('agent_jobs', new typeorm_1.TableIndex({
|
|
138
|
+
name: 'IDX_agent_jobs_created_at',
|
|
139
|
+
columnNames: ['created_at'],
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
async down(queryRunner) {
|
|
143
|
+
await queryRunner.dropIndex('agent_jobs', 'IDX_agent_jobs_created_at');
|
|
144
|
+
await queryRunner.dropIndex('agent_jobs', 'IDX_agent_jobs_status');
|
|
145
|
+
await queryRunner.dropIndex('agent_jobs', 'IDX_agent_jobs_user_id');
|
|
146
|
+
await queryRunner.dropTable('agent_jobs');
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
exports.CreateAgentJobsTable1713000055 = CreateAgentJobsTable1713000055;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clhq-postgres-module",
|
|
3
|
-
"version": "1.1.0-alpha.
|
|
3
|
+
"version": "1.1.0-alpha.185",
|
|
4
4
|
"description": "PostgreSQL module using TypeORM for Clippy",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -40,7 +40,12 @@
|
|
|
40
40
|
"db:preseed:apply": "npx ts-node scripts/preseed-migrations.ts --apply",
|
|
41
41
|
"db:test": "env-cmd -f ../../.env.dev npx ts-node scripts/test-connections.ts",
|
|
42
42
|
"db:sync": "env-cmd -f ../../.env.dev npm run typeorm schema:sync -- -d src/config/data-source.ts",
|
|
43
|
-
"db:drop": "env-cmd -f ../../.env.dev npm run typeorm schema:drop -- -d src/config/data-source.ts"
|
|
43
|
+
"db:drop": "env-cmd -f ../../.env.dev npm run typeorm schema:drop -- -d src/config/data-source.ts",
|
|
44
|
+
"infra:deploy": "env-cmd -f ../../.env.dev sls deploy --stage ${STAGE:-dev}",
|
|
45
|
+
"infra:info": "env-cmd -f ../../.env.dev sls info --stage ${STAGE:-dev} --verbose",
|
|
46
|
+
"infra:remove": "env-cmd -f ../../.env.dev sls remove --stage ${STAGE:-dev}",
|
|
47
|
+
"db:rds:bootstrap": "ts-node scripts/bootstrap-rds.ts",
|
|
48
|
+
"db:rds:url": "ts-node scripts/bootstrap-rds.ts --print"
|
|
44
49
|
},
|
|
45
50
|
"dependencies": {
|
|
46
51
|
"@nestjs/common": "11.1.9",
|