Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

Feature database migrations - #70

Merged
sopyb merged 2 commits into
masterfrom
feature-databasemigrations
Oct 6, 2023
Merged

sopyb merged 2 commits into
masterfrom
feature-databasemigrations

Conversation

@sopyb

@sopyb sopyb commented Oct 6, 2023

Copy link
Copy Markdown
Owner

No description provided.

sopyb added 2 commits October 6, 2023 16:34
Extracted SQL script execution into a separate function, thus enhancing the code readability and maintainability. The previous implementation had redundancy with comments and empty line removal processes. By creating the _executeFile method, these operations are now separately handled.
This commit introduces a new 'migrations' table in the database to keep track of executed database migrations. A 'migrations' section was also added accordingly in the 'databaseDriver.ts'. The migration files in the 'migrations' directory will now be sorted and executed in order. After a successful execution, the migration file information will be added to the 'migrations' table. This change was necessary to maintain the order and consistency of database migrations, and to prevent the re-execution of an already executed migration script.
@sopyb
sopyb merged commit 63fa4e0 into master Oct 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant