mirror of
https://github.com/go-shiori/shiori.git
synced 2026-04-25 06:25:54 +03:00
[PR #876] [MERGED] feat: new migration system #835
Labels
No labels
component:backend
component:builds
component:builds
component:extension
component:frontend
component:readability
database
database:mysql
database:postgres
database:sqlite
feature:ebooks
github_actions
good first issue
hacktoberfest
note:duplicate?
note:fixed?
note:out-of-scope?
os:windows
priority:high
priority:low
pull-request
resolution:as-intended
resolution:cant-reproduce
resolution:duplicate
resolution:fixed
resolution:wontfix
tag:TBD
tag:big-task
tag:help-wanted
tag:huge-data
tag:meta
tag:more-info
tag:next
tag:no-stale
tag:requires-migrations
tag:research
tag:security 🛡️
tag:stale
tag:waiting-for-assignee
type:bug
type:documentation
type:enhancement
type:meta
type:ux
user:cli
user:web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shiori#835
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/go-shiori/shiori/pull/876
Author: @fmartingr
Created: 4/6/2024
Status: ✅ Merged
Merged: 4/27/2024
Merged by: @fmartingr
Base:
master← Head:feat/migrations📝 Commits (10+)
525f5defeat: new migration systema14e9bcuse newFuncMigration04bea9fdatabase version -> database schema versionc9707fdcolumn name7b98627use path instead of filepath for goembed0f8762asimplified migrations, added backwards compatible migrations74e9399Merge branch 'master' into feat/migrationsd412a99Merge branch 'master' into feat/migrations6d5d5e1Merge remote-tracking branch 'origin/master' into feat/migrations0de4246Merge branch 'master' into feat/migrations📊 Changes
33 files changed (+392 additions, -301 deletions)
View changed files
📝
go.mod(+2 -17)📝
go.sum(+5 -163)📝
internal/cmd/root.go(+1 -1)📝
internal/database/database.go(+10 -5)➕
internal/database/migrations.go(+97 -0)➕
internal/database/migrations/mysql/0000_system_create.up.sql(+3 -0)➕
internal/database/migrations/mysql/0000_system_insert.up.sql(+1 -0)📝
internal/database/migrations/mysql/0001_initial_account.up.sql(+1 -0)➖
internal/database/migrations/mysql/0002_initial.up.sql(+0 -14)➕
internal/database/migrations/mysql/0002_initial_bookmark.up.sql(+15 -0)📝
internal/database/migrations/mysql/0003_initial_tag.up.sql(+0 -0)📝
internal/database/migrations/mysql/0004_initial_bookmark_tag.up.sql(+0 -0)➖
internal/database/migrations/mysql/0005_config.down.sql(+0 -1)➖
internal/database/migrations/mysql/0005_config.up.sql(+0 -2)➕
internal/database/migrations/postgres/0000_system.up.sql(+5 -0)📝
internal/database/migrations/postgres/0001_initial.up.sql(+13 -11)➖
internal/database/migrations/postgres/0002_config.down.sql(+0 -1)➖
internal/database/migrations/postgres/0002_config.up.sql(+0 -2)➕
internal/database/migrations/sqlite/0000_system.up.sql(+5 -0)📝
internal/database/migrations/sqlite/0001_initial.up.sql(+2 -0)...and 13 more files
📄 Description
This pull request removes the
golang-migratedependency for a new custom migration system. This new system will leverage existing files but will add the possibility of running Golang code as a migration for portability.Changes:
DBinterface:GetDatabaseSchemaVersion: Retrieves the database schema versionSetDatabaseSchemaVersion: Sets the database schema versionDBx: returns the underlyingdbx.DBobject.DB.Migratenow requires acontext.ContextCaveats:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.