Last active
January 17, 2017 19:23
-
-
Save Fernan2/6ba272b5fb571956969b260b17febe02 to your computer and use it in GitHub Desktop.
Enumerados en Rails y Postgres
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 CreateFinalidadPrestamo < ActiveRecord::Migration | |
| def up | |
| execute <<-SQL | |
| CREATE TYPE finalidad_prestamo AS | |
| ENUM ('Reunificar deudas', 'Estudios', 'Imprevistos', 'Compra de vehículo', 'Viaje', 'Reformas hogar', 'Otros'); | |
| SQL | |
| end | |
| def down | |
| execute <<-SQL | |
| DROP TYPE finalidad_prestamo; | |
| SQL | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment