Last active
May 2, 2016 22:00
-
-
Save arubis/8c794601814cd42d9370ed329bc783f9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 hidden or 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 | |
== 20160502173036 AddLoginPreferenceToCustomers: migrating ==================== | |
-- execute(" CREATE TYPE login_preference AS ENUM ('lz', 'clever');\n") | |
-> 0.0145s | |
-- add_column(:customers, :login_preference, :login_preference, {:index=>true}) | |
-> 0.0160s | |
== 20160502173036 AddLoginPreferenceToCustomers: migrated (0.0307s) =========== | |
** 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 199548: failed to recognize type of 'login_preference'. It will be treated as String. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment