https://github.com/shantaramk/databasemigration
Database migration is required whenever there is a change in existing database in new version of the app.
https://github.com/shantaramk/databasemigration
database-migrations ios migration sqlite3 sqlite3-database swift
Last synced: about 1 year ago
JSON representation
Database migration is required whenever there is a change in existing database in new version of the app.
- Host: GitHub
- URL: https://github.com/shantaramk/databasemigration
- Owner: shantaramk
- Created: 2019-06-21T07:28:39.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-11-11T12:59:37.000Z (over 6 years ago)
- Last Synced: 2025-01-15T01:50:02.345Z (about 1 year ago)
- Topics: database-migrations, ios, migration, sqlite3, sqlite3-database, swift
- Language: Swift
- Homepage:
- Size: 2.26 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DatabaseMigration
# DatabaseMigration
Database migration is required whenever there is a change in existing database in new version of the app.
How to use
DATABASEHELPER.initializeDatabase(Database.fileName)
DATABASEHELPER.migrateToVersion(version: 1)
print("DB Key:", DATABASEHELPER.getSecretKeyFromKeyChain())
What to do
Name the .sql file with the database change version number included.
e.g. migration-1.sql , migration-2.sql …
Keep all previous .sql files intact.