Skip to content

Commit 2281261

Browse files
committed
refactor: Remove migration service and migration table schema
1 parent 7068b92 commit 2281261

File tree

3 files changed

+0
-65
lines changed

3 files changed

+0
-65
lines changed

src/database/Client.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { ConnectionPool } from './ConnectionPool';
2-
import { MigrationService } from './service/Migration';
32
import { TablesService } from './service/Tables';
43
export class Client {
54
private _connectionPool: ConnectionPool;
@@ -8,12 +7,6 @@ export class Client {
87
}
98
async initialize() {
109
await this._connectionPool.connect();
11-
const migrationService = new MigrationService(this._connectionPool);
12-
13-
console.log('Applying migrations...');
14-
await migrationService.applyMigrations(); // Apply pending migrations
15-
console.log('Migrations applied successfully.');
16-
1710
const tablesService = new TablesService(this._connectionPool);
1811
console.log('Setting up initial tables...');
1912
await tablesService.initialTables();

src/database/service/Migration.ts

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/database/sql/Tables.sql

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,4 @@ CREATE TABLE IF NOT EXISTS "GroupRule" (
5050
rule_text TEXT[], -- Text of the rule
5151
added_at TIMESTAMP DEFAULT NOW(),
5252
added_by BIGINT REFERENCES "User"(id)
53-
);
54-
-- migration table schema
55-
CREATE TABLE IF NOT EXISTS "Migration" (
56-
id SERIAL PRIMARY KEY,
57-
name TEXT UNIQUE NOT NULL,
58-
applied_at TIMESTAMP DEFAULT NOW()
5953
);

0 commit comments

Comments
 (0)