Merge pull request 'switched from mysql to sqlite (closes #1)' (#2) from feat-1-switch-to-sqlite into main

Reviewed-on: #2
pull/4/head
Inga 🏳‍🌈 10 months ago
commit 0fe914be2b
  1. 3
      .gitignore
  2. 11
      ormconfig.json
  3. 1932
      package-lock.json
  4. 4
      package.json
  5. 2
      src/migrations/1649937605127-Initial.ts

3
.gitignore vendored

@ -33,3 +33,6 @@ lerna-debug.log*
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# SQLite database
payments.db

@ -1,11 +1,8 @@
{
"type": "mysql",
"host": "",
"port": 3306,
"username": "",
"password": "",
"database": "tryout_backend",
"type": "sqlite",
"database": "payments.db",
"entities": ["dist/**/*.entity{.ts,.js}"],
"migrations": ["src/migrations/*.ts"],
"synchronize": false
}
}

1932
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -30,10 +30,10 @@
"axios": "0.26.1",
"chai-as-promised": "^7.1.1",
"joi": "17.6.0",
"mysql2": "2.3.3",
"reflect-metadata": "0.1.13",
"rimraf": "3.0.2",
"rxjs": "7.5.5"
"rxjs": "7.5.5",
"sqlite3": "^5.1.7"
},
"devDependencies": {
"@nestjs/cli": "8.0.0",

@ -4,7 +4,7 @@ export class Initial1649937605127 implements MigrationInterface {
name = 'Initial1649937605127'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`CREATE TABLE \`transaction\` (\`id\` int NOT NULL AUTO_INCREMENT, \`amount\` int NOT NULL, \`currency\` varchar(255) NOT NULL, \`client_id\` int NOT NULL, \`date\` varchar(255) NOT NULL, \`commission\` int NOT NULL, \`base_currency\` varchar(255) NOT NULL, \`base_amount\` int NOT NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
await queryRunner.query(`CREATE TABLE \`transaction\` (\`id\` int NOT NULL, \`amount\` int NOT NULL, \`currency\` varchar(255) NOT NULL, \`client_id\` int NOT NULL, \`date\` varchar(255) NOT NULL, \`commission\` int NOT NULL, \`base_currency\` varchar(255) NOT NULL, \`base_amount\` int NOT NULL, PRIMARY KEY (\`id\`))`);
}
public async down(queryRunner: QueryRunner): Promise<void> {

Loading…
Cancel
Save