summaryrefslogtreecommitdiff
path: root/doc/en_US/solving-database-migration-issues.markdown
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-01-29 11:07:42 -0500
committerFrederic Guillot <fred@kanboard.net>2017-01-29 11:07:42 -0500
commit0371acff89b14b9bdcb03e72fd9637e26e6b517c (patch)
treef5878c9c07705379d137843cb8f92e3cdf7c20a8 /doc/en_US/solving-database-migration-issues.markdown
parent3bf4789be255650b64f42231f41383cb13b65572 (diff)
Move English documentation to folder en_US
Diffstat (limited to 'doc/en_US/solving-database-migration-issues.markdown')
-rw-r--r--doc/en_US/solving-database-migration-issues.markdown23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/en_US/solving-database-migration-issues.markdown b/doc/en_US/solving-database-migration-issues.markdown
new file mode 100644
index 00000000..ddd39db6
--- /dev/null
+++ b/doc/en_US/solving-database-migration-issues.markdown
@@ -0,0 +1,23 @@
+Solving Database Migration Issues
+=================================
+
+- SQL migrations are executed automatically when you upgrade Kanboard to a new version
+- For Postgres and Mysql, the current schema version number is stored in the table `schema_version` and for Sqlite this is stored in the variable `user_version
+- Migrations are defined in the file `app/Schema/<DatabaseType>.php`
+- Each function is a migration
+- Each migration is executed in a transaction
+- If migration generate an error, a rollback is performed
+
+When upgrading:
+
+- Always backup your data
+- Do not run migrations in parallel from multiple processes
+
+If you got the error "Unable to run SQL migrations [...]", here are the steps to fix it manually:
+
+1. Open the file corresponding to your database `app/Schema/Sqlite.php` or `app/Schema/Mysql.php`
+2. Go to the failed migration function
+3. Execute manually the SQL queries defined in the function
+4. If you encounter an error, report the issue to the bug tracker with the exact SQL error
+5. When all SQL statements of the migration are executed, update the schema version number
+6. Run other migrations