mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-05 20:54:14 +00:00
Binary: extend the migrate-db subcommand with --dump and --restore so a SQLite database can be exported to a portable SQL text dump and rebuilt from one, alongside the existing --dsn PostgreSQL copy. Implemented in Go via the bundled sqlite driver (new database/dump_sqlite.go); no external sqlite3 client is required. Add ExportPostgresToSQLite (reverse of MigrateData) to build a SQLite .db from live PostgreSQL data, reusing the shared copyAllModels helper. Overview: add a "Download Migration" item to Backup & Restore plus a getMigration endpoint/service that returns a .dump on SQLite or a .db on PostgreSQL, so the data can seed a panel on the other backend. Document the endpoint in api-docs and translate the three new strings across all locales. Tests: cover the destination-side copy (AutoMigrate + copyTable into SQLite) and the dump/restore round-trip including quoted values. Ignore *.dump. The x-ui.sh helper that drives this from the CLI is in PR #4910.
47 lines
No EOL
582 B
Text
47 lines
No EOL
582 B
Text
# Ignore editor and IDE settings
|
|
.idea/
|
|
.vscode/
|
|
.claude/
|
|
.cache/
|
|
.sync*
|
|
|
|
# Ignore log files
|
|
*.log
|
|
|
|
# Ignore temporary files
|
|
tmp/
|
|
*.tar.gz
|
|
|
|
# Ignore build and distribution directories
|
|
backup/
|
|
bin/
|
|
dist/
|
|
!web/dist/
|
|
web/dist/*
|
|
!web/dist/.gitkeep
|
|
release/
|
|
node_modules/
|
|
|
|
# Ignore compiled binaries
|
|
main
|
|
|
|
# Ignore script and executable files
|
|
/release.sh
|
|
/x-ui
|
|
|
|
# Ignore OS specific files
|
|
.DS_Store
|
|
Thumbs.db
|
|
|
|
# Ignore Go build files
|
|
*.exe
|
|
x-ui.db
|
|
x-ui.db-shm
|
|
x-ui.db-wal
|
|
*.dump
|
|
|
|
# Ignore Docker specific files
|
|
docker-compose.override.yml
|
|
|
|
# Ignore .env (Environment Variables) file
|
|
.env |