Open andyhull opened 10 years ago
Ideally, I think this should work as the code says now — the migration runs if and only if the database connection is SQL Server. So my preference would be to work out the kinks so that the conditional works (pretty sure we could get a SQL Server instance set up if you don't have one already).
@andyhull — Could you log into one of the instances and check the value of ActiveRecord::Base.connection.adapter_name
? Maybe it's a symbol instead of a string?
My thinking is that the only way to do that in a deployment context would be manually, and that seems dirty and likely to break.
(FYI @andyhull — I updated the gist URL above because it was a .git link rather than a viewable code snippet.)
To make sure I'm clear, I think this should be a migration that lives in the master
code base itself.
Putting the migration in master
sounds reasonable to me. I'll look into the ActiveRecord::Base.connection.adapter_name
thing.
So there is a problem when using sqlserver and devise. You have to remove a unique index constraint on the user table. This migration will do it (although I had to comment out the if == "sqlserver" to get it to run):
https://gist.github.com/andyhull/8045794202fd52930f93
Not sure if/where this would go in the scripts.
Here is the original issue: https://github.com/codeforamerica/promptly/issues/341