@dbos-inc/dbos-sdk 0.8.61-preview → 0.8.67-preview.g1cdd64bc60

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @param { import("knex").Knex } knex
3
+ * @returns { Promise<void> }
4
+ */
5
+ exports.up = function(knex) {
6
+ return knex.schema.withSchema('dbos')
7
+ .alterTable('workflow_status', function(table) {
8
+ table.index('created_at');
9
+ })
10
+ .alterTable('operation_outputs', function(table) {
11
+ table.foreign('workflow_uuid').references('workflow_uuid').inTable('dbos.workflow_status').onDelete('CASCADE').onUpdate('CASCADE');
12
+ })
13
+ .alterTable('workflow_inputs', function(table) {
14
+ table.foreign('workflow_uuid').references('workflow_uuid').inTable('dbos.workflow_status').onDelete('CASCADE').onUpdate('CASCADE');
15
+ })
16
+ .alterTable('notifications', function(table) {
17
+ table.foreign('destination_uuid').references('workflow_uuid').inTable('dbos.workflow_status').onDelete('CASCADE').onUpdate('CASCADE');
18
+ })
19
+ .alterTable('workflow_events', function(table) {
20
+ table.foreign('workflow_uuid').references('workflow_uuid').inTable('dbos.workflow_status').onDelete('CASCADE').onUpdate('CASCADE');
21
+ });
22
+ };
23
+
24
+ /**
25
+ * @param { import("knex").Knex } knex
26
+ * @returns { Promise<void> }
27
+ */
28
+ exports.down = function(knex) {
29
+ return knex.schema.withSchema('dbos')
30
+ .alterTable('workflow_status', function(table) {
31
+ table.dropIndex('created_at');
32
+ })
33
+ .alterTable('operation_outputs', function(table) {
34
+ table.dropForeign('workflow_uuid');
35
+ })
36
+ .alterTable('workflow_inputs', function(table) {
37
+ table.dropForeign('workflow_uuid');
38
+ })
39
+ .alterTable('notifications', function(table) {
40
+ table.dropForeign('destination_uuid');
41
+ })
42
+ .alterTable('workflow_events', function(table) {
43
+ table.dropForeign('workflow_uuid');
44
+ });
45
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dbos-inc/dbos-sdk",
3
- "version": "0.8.61-preview",
3
+ "version": "0.8.67-preview.g1cdd64bc60",
4
4
  "description": "A Typescript framework built on the database",
5
5
  "license": "MIT",
6
6
  "repository": {