Last active
May 2, 2016 22:12
-
-
Save arubis/66eff876aa1365cd644ebe89c62e1ddb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddLoginPreferenceToCustomers < ActiveRecord::Migration | |
def up | |
execute <<-SQL | |
CREATE TYPE loginpreference AS ENUM ('lz', 'clever'); | |
SQL | |
add_column :customers, :loginpreference, :loginpreference, index: true | |
end | |
def down | |
remove_column :customers, :loginpreference | |
execute <<-SQL | |
DROP TYPE loginpreference; | |
SQL | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
** Invoke db:migrate (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
** Invoke db:load_config (first_time) | |
** Execute db:load_config | |
** Execute db:migrate | |
== 20160502220701 AddLoginPreferenceToCustomers: migrating ==================== | |
-- execute(" CREATE TYPE loginpreference AS ENUM ('lz', 'clever');\n") | |
-> 0.0144s | |
-- add_column(:customers, :loginpreference, :loginpreference, {:index=>true}) | |
-> 0.0166s | |
== 20160502220701 AddLoginPreferenceToCustomers: migrated (0.0311s) =========== | |
** Invoke db:_dump (first_time) | |
** Execute db:_dump | |
** Invoke db:schema:dump (first_time) | |
** Invoke environment | |
** Invoke db:load_config | |
** Invoke schema_plus:load (first_time) | |
** Execute schema_plus:load | |
** Execute db:schema:dump | |
unknown OID 199556: failed to recognize type of 'loginpreference'. It will be treated as String. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment