switched from mysql to sqlite (closes #1)

pull/2/head
Inga 🏳‍🌈 11 months ago
parent 8b6669b296
commit 76f2ffefab
  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