switched from mysql to sqlite (closes #1) #2

Merged
inga-lovinde merged 1 commits from feat-1-switch-to-sqlite into main 10 months ago
  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/tasks.json
!.vscode/launch.json !.vscode/launch.json
!.vscode/extensions.json !.vscode/extensions.json
# SQLite database
payments.db

@ -1,11 +1,8 @@
{ {
"type": "mysql", "type": "sqlite",
"host": "", "database": "payments.db",
"port": 3306,
"username": "",
"password": "",
"database": "tryout_backend",
"entities": ["dist/**/*.entity{.ts,.js}"], "entities": ["dist/**/*.entity{.ts,.js}"],
"migrations": ["src/migrations/*.ts"], "migrations": ["src/migrations/*.ts"],
"synchronize": false "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", "axios": "0.26.1",
"chai-as-promised": "^7.1.1", "chai-as-promised": "^7.1.1",
"joi": "17.6.0", "joi": "17.6.0",
"mysql2": "2.3.3",
"reflect-metadata": "0.1.13", "reflect-metadata": "0.1.13",
"rimraf": "3.0.2", "rimraf": "3.0.2",
"rxjs": "7.5.5" "rxjs": "7.5.5",
"sqlite3": "^5.1.7"
}, },
"devDependencies": { "devDependencies": {
"@nestjs/cli": "8.0.0", "@nestjs/cli": "8.0.0",

@ -4,7 +4,7 @@ export class Initial1649937605127 implements MigrationInterface {
name = 'Initial1649937605127' name = 'Initial1649937605127'
public async up(queryRunner: QueryRunner): Promise<void> { 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> { public async down(queryRunner: QueryRunner): Promise<void> {

Loading…
Cancel
Save