Skip to content
Merged
Prev Previous commit
Next Next commit
changing from typeorm sync to migrations - initial migration checks f…
…or existing user table and skips migration if it exists as this was a DB already generated by the sync
  • Loading branch information
alex-phillips committed Apr 14, 2022
commit 208a37c971e9646305efaadf4d0e0b59eed92604
13 changes: 1 addition & 12 deletions backend/ormconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,7 @@ const { join } = require('path')
const config: ConnectionOptions = {
type: 'sqlite',
database: process.env.BUDGE_DATABASE || './budge.sqlite',

// type: 'postgres',
// port: parseInt(process.env.BUDGE_DB_PORT) || 5432,

// type: 'mariadb',
// port: parseInt(process.env.BUDGE_DB_PORT) || 3306,

// host: process.env.BUDGE_DB_HOST || '192.168.1.91',
// username: process.env.BUDGE_DB_USERNAME || 'budge',
// password: process.env.BUDGE_DB_PASSWORD || '3uY8xTX6j8oTVqJ_',
// database: process.env.BUDGE_DATABASE || 'budge',
synchronize: true,
synchronize: false,
logging: false,
entities: [join(__dirname, 'src/entities/**', '*.{ts,js}')],
migrations: [join(__dirname, 'src/migrations/**', '*.{ts,js}')],
Expand Down
Loading