Migrating redmine to SQL Server from SQLite
Added by Mathew Ferreira almost 9 years ago
I exported the sqlite database as an sql, did a bunch of sytax corrections and now have a statement that will recreate my database in SQL Server. However after I edit the database.yml and run bundle exec rake db:migrate RAILS_ENV=production it seems like it tries to recreate all the tables.
What's the correct procedure to get my existing installation to use a SQL Server database.
Replies (1)
RE: Migrating redmine to SQL Server from SQLite - Added by Mathew Ferreira almost 9 years ago
Got it working early this morning
Step 1. Edit the database.yml file, there are examples for sqlserver at the bottom of the file.
Step 2. Create the new database to which you'll be migrating to
Step 3. Run the bundle exec rake db:migrate RAILS_ENV=production command, restart whatever hosts your redmine
Step 4. Test that redmine is now pointing to the fresh database, it'll just show you a default redmine page
Step 5. Dump all the old database info to an sql file (Any sqlite db browser software will do) Once you have that file erase all the create table statements and correct any syntax issues. ('F' to '0' for booleans etc)
Step 6. Run the file created by step 5. It should insert all the data into your new database and redmine should grab it all and work as it did on the sqlite database