mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
Initial migration files for each DB
This commit is contained in:
parent
c2d7474d19
commit
1aa51944a6
68
packages/cli/ormconfig.ts
Normal file
68
packages/cli/ormconfig.ts
Normal file
|
@ -0,0 +1,68 @@
|
|||
import {MongoDb, SQLite, MySQLDb, PostgresDb} from './src/databases/index';
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
"type": "mongodb",
|
||||
"logging": false,
|
||||
"entities": Object.values(MongoDb),
|
||||
"migrations": [
|
||||
"./src/databases/mongodb/Migrations/**/*.ts"
|
||||
],
|
||||
"subscribers": [
|
||||
"src/subscriber/**/*.ts"
|
||||
],
|
||||
"cli": {
|
||||
"entitiesDir": "./src/databases/mongodb",
|
||||
"migrationsDir": "./src/databases/mongodb/Migrations",
|
||||
"subscribersDir": "./src/databases/mongodb/Subscribers"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "postgres",
|
||||
"logging": false,
|
||||
"entities": Object.values(PostgresDb),
|
||||
"migrations": [
|
||||
"./src/databases/postgresdb/Migrations/**/*.ts"
|
||||
],
|
||||
"subscribers": [
|
||||
"src/subscriber/**/*.ts"
|
||||
],
|
||||
"cli": {
|
||||
"entitiesDir": "./src/databases/postgresdb",
|
||||
"migrationsDir": "./src/databases/postgresdb/Migrations",
|
||||
"subscribersDir": "./src/databases/postgresdb/Subscribers"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "sqlite",
|
||||
"logging": false,
|
||||
"entities": Object.values(SQLite),
|
||||
"migrations": [
|
||||
"./src/databases/sqlite/Migrations/**/*.ts"
|
||||
],
|
||||
"subscribers": [
|
||||
"src/subscriber/**/*.ts"
|
||||
],
|
||||
"cli": {
|
||||
"entitiesDir": "./src/databases/sqlite",
|
||||
"migrationsDir": "./src/databases/sqlite/Migrations",
|
||||
"subscribersDir": "./src/databases/sqlite/Subscribers"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "mysql",
|
||||
"logging": false,
|
||||
"entities": Object.values(MySQLDb),
|
||||
"migrations": [
|
||||
"./src/databases/mysqldb/Migrations/**/*.ts"
|
||||
],
|
||||
"subscribers": [
|
||||
"src/subscriber/**/*.ts"
|
||||
],
|
||||
"cli": {
|
||||
"entitiesDir": "./src/databases/mysqldb",
|
||||
"migrationsDir": "./src/databases/mysqldb/Migrations",
|
||||
"subscribersDir": "./src/databases/mysqldb/Subscribers"
|
||||
}
|
||||
},
|
||||
];
|
|
@ -28,7 +28,8 @@
|
|||
"start:windows": "cd bin && n8n",
|
||||
"test": "jest",
|
||||
"tslint": "tslint -p tsconfig.json -c tslint.json",
|
||||
"watch": "tsc --watch"
|
||||
"watch": "tsc --watch",
|
||||
"typeorm": "ts-node ./node_modules/typeorm/cli.js"
|
||||
},
|
||||
"bin": {
|
||||
"n8n": "./bin/n8n"
|
||||
|
@ -104,7 +105,7 @@
|
|||
"request-promise-native": "^1.0.7",
|
||||
"sqlite3": "^4.0.6",
|
||||
"sse-channel": "^3.1.1",
|
||||
"typeorm": "^0.2.16"
|
||||
"typeorm": "^0.2.24"
|
||||
},
|
||||
"jest": {
|
||||
"transform": {
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
import {MigrationInterface, QueryRunner} from "typeorm";
|
||||
|
||||
export class InitialMigration1587563438936 implements MigrationInterface {
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<any> {
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<any> {
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
import {MigrationInterface, QueryRunner} from "typeorm";
|
||||
|
||||
export class InitialMigration1587563497207 implements MigrationInterface {
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<any> {
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<any> {
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
import {MigrationInterface, QueryRunner} from "typeorm";
|
||||
|
||||
export class InitialMigration1587563465704 implements MigrationInterface {
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<any> {
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<any> {
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
import {MigrationInterface, QueryRunner} from "typeorm";
|
||||
|
||||
export class InitialMigration1587563481290 implements MigrationInterface {
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<any> {
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<any> {
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue