style: auto format whole project
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Knex } from "knex";
|
||||
import { Knex } from 'knex';
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
return knex.schema.createTable('users', (table) => {
|
||||
@@ -8,10 +8,8 @@ export async function up(knex: Knex): Promise<void> {
|
||||
|
||||
table.timestamps(true, true);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
export async function down(knex: Knex): Promise<void> {
|
||||
return knex.schema.dropTable('users');
|
||||
}
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { Knex } from "knex";
|
||||
import { Knex } from 'knex';
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
return knex.schema.createTable('credentials', (table) => {
|
||||
table.uuid('id').primary().defaultTo(knex.raw('gen_random_uuid()'))
|
||||
table.uuid('id').primary().defaultTo(knex.raw('gen_random_uuid()'));
|
||||
table.string('key').notNullable();
|
||||
table.string('display_name').notNullable();
|
||||
table.text('data').notNullable();
|
||||
@@ -11,7 +11,7 @@ export async function up(knex: Knex): Promise<void> {
|
||||
|
||||
table.timestamps(true, true);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export async function down(knex: Knex): Promise<void> {
|
||||
return knex.schema.dropTable('credentials');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { Knex } from "knex";
|
||||
import { Knex } from 'knex';
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
return knex.schema.table('credentials', (table) => {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { Knex } from "knex";
|
||||
import { Knex } from 'knex';
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
return knex.schema.renameTable('credentials', 'connections');
|
||||
|
@@ -2,7 +2,7 @@ import { Knex } from 'knex';
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
return knex.schema.createTable('steps', (table) => {
|
||||
table.uuid('id').primary().defaultTo(knex.raw('gen_random_uuid()'))
|
||||
table.uuid('id').primary().defaultTo(knex.raw('gen_random_uuid()'));
|
||||
table.string('key').notNullable();
|
||||
table.string('app_key').notNullable();
|
||||
table.string('type').notNullable();
|
||||
|
@@ -1,14 +1,14 @@
|
||||
import { Knex } from "knex";
|
||||
import { Knex } from 'knex';
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
return knex.schema.createTable('flows', (table) => {
|
||||
table.uuid('id').primary().defaultTo(knex.raw('gen_random_uuid()'))
|
||||
table.uuid('id').primary().defaultTo(knex.raw('gen_random_uuid()'));
|
||||
table.string('name');
|
||||
table.uuid('user_id').references('id').inTable('users');
|
||||
|
||||
table.timestamps(true, true);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export async function down(knex: Knex): Promise<void> {
|
||||
return knex.schema.dropTable('flows');
|
||||
|
@@ -1,15 +1,11 @@
|
||||
import { Knex } from "knex";
|
||||
import { Knex } from 'knex';
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
return knex.schema.table('steps', (table) => {
|
||||
table
|
||||
.uuid('flow_id')
|
||||
.references('id')
|
||||
.inTable('flows');
|
||||
table.uuid('flow_id').references('id').inTable('flows');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export async function down(knex: Knex): Promise<void> {
|
||||
return knex.schema.table('steps', (table) => {
|
||||
table.dropColumn('flow_id');
|
||||
|
@@ -1,16 +1,15 @@
|
||||
import { Knex } from "knex";
|
||||
import { Knex } from 'knex';
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
return knex.schema.alterTable('steps', table => {
|
||||
return knex.schema.alterTable('steps', (table) => {
|
||||
table.string('key').nullable().alter();
|
||||
table.string('app_key').nullable().alter();
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export async function down(knex: Knex): Promise<void> {
|
||||
return knex.schema.alterTable('steps', table => {
|
||||
return knex.schema.alterTable('steps', (table) => {
|
||||
table.string('key').notNullable().alter();
|
||||
table.string('app_key').notNullable().alter();
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { Knex } from "knex";
|
||||
import { Knex } from 'knex';
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
return knex.schema.table('flows', (table) => {
|
||||
table.boolean('active').defaultTo(false)
|
||||
table.boolean('active').defaultTo(false);
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@ import { Knex } from 'knex';
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
return knex.schema.createTable('executions', (table) => {
|
||||
table.uuid('id').primary().defaultTo(knex.raw('gen_random_uuid()'))
|
||||
table.uuid('id').primary().defaultTo(knex.raw('gen_random_uuid()'));
|
||||
table.uuid('flow_id').references('id').inTable('flows');
|
||||
table.boolean('test_run').notNullable().defaultTo(false);
|
||||
|
||||
|
@@ -2,7 +2,7 @@ import { Knex } from 'knex';
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
return knex.schema.createTable('execution_steps', (table) => {
|
||||
table.uuid('id').primary().defaultTo(knex.raw('gen_random_uuid()'))
|
||||
table.uuid('id').primary().defaultTo(knex.raw('gen_random_uuid()'));
|
||||
table.uuid('execution_id').references('id').inTable('executions');
|
||||
table.uuid('step_id').references('id').inTable('steps');
|
||||
table.string('status');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { Knex } from "knex";
|
||||
import { Knex } from 'knex';
|
||||
|
||||
async function addDeletedColumn(knex: Knex, tableName: string) {
|
||||
return await knex.schema.table(tableName, (table) => {
|
||||
|
Reference in New Issue
Block a user