code stringlengths 1 1.73M | language stringclasses 1
value |
|---|---|
class AddCamposToUsuarios < ActiveRecord::Migration
def self.up
add_column :usuarios, :nombres, :string
add_column :usuarios, :apellidos, :string
add_column :usuarios, :lugar_nacimiento, :string
add_column :usuarios, :nacionalidad, :string
add_column :usuarios, :tipo_sangre, :string
add_column... | Ruby |
class CreatePlanesHorarios < ActiveRecord::Migration
def self.up
create_table :planes_horarios do |t|
t.date :inicio
t.date :fin
t.integer :usuario_id
t.integer :grupo_horario_id
t.timestamps
end
end
def self.down
drop_table :planes_horarios
end
end
| Ruby |
class CreateReconocimientos < ActiveRecord::Migration
def self.up
create_table :reconocimientos do |t|
t.references :usuario
t.references :tipo_reconocimiento
t.date :fecha
t.text :comentario
t.timestamps
end
end
def self.down
drop_table :reconocimientos
end
end
| Ruby |
class AddLatAndLngToUsuario < ActiveRecord::Migration
def self.up
add_column :usuarios, :lat, :decimal, :precision => 15, :scale => 10
add_column :usuarios, :lng, :decimal, :precision => 15, :scale => 10
end
def self.down
remove_column :usuarios, :lng
remove_column :usuarios, :lat
end
end
| Ruby |
class CreateControlleres < ActiveRecord::Migration
def self.up
create_table :controlleres do |t|
t.string :nombre
t.string :descripcion
t.integer :modulo_id
t.timestamps
end
end
def self.down
drop_table :controlleres
end
end
| Ruby |
class AddIncidenteIdToPremiacion < ActiveRecord::Migration
def self.up
add_column :premiaciones, :incidente_id, :integer
end
def self.down
remove_column :premiaciones, :incidente_id
end
end
| Ruby |
class CreateSolicitudesRespuestas < ActiveRecord::Migration
def self.up
create_table :solicitudes_respuestas do |t|
t.integer :solicitud_id
t.integer :usuario_id
t.timestamps
end
end
def self.down
drop_table :solicitudes_respuestas
end
end
| Ruby |
class AddColumnToRespuestas < ActiveRecord::Migration
def self.up
add_column :respuestas, :evaluado_id, :integer
end
def self.down
remove_column :respuestas, :evaluado_id
end
end
| Ruby |
class AddFormatoFechaAndFormatoHoraToModelo < ActiveRecord::Migration
def self.up
add_column :modelos, :formato_hora, :string
add_column :modelos, :formato_fecha, :string
end
def self.down
remove_column :modelos, :formato_fecha
remove_column :modelos, :formato_hora
end
end
| Ruby |
class CreateCarpetas < ActiveRecord::Migration
def self.up
create_table :carpetas do |t|
t.string :nombre
t.timestamps
end
end
def self.down
drop_table :carpetas
end
end
| Ruby |
class AddObservacionToIncidente < ActiveRecord::Migration
def self.up
add_column :incidentes, :observacion, :text
end
def self.down
remove_column :incidentes, :observacion
end
end
| Ruby |
class AgregarPerfiles < ActiveRecord::Migration
def self.up
perf = Modulo.create!(:nombre => "movimientos", :descripcion => "Movimientos financieros")
perf.precarga_acciones
perf = Modulo.create!(:nombre => "recibos", :descripcion => "Recibos de Salario")
perf.precarga_acciones
perf = Modulo.creat... | Ruby |
class AddCamposToHijos < ActiveRecord::Migration
def self.up
add_column :hijos, :nacimiento, :date
add_column :hijos, :especial, :boolean
end
def self.down
remove_column :hijos, :especial
remove_column :hijos, :nacimiento
end
end
| Ruby |
class AddCodigoToTipoMovimientos < ActiveRecord::Migration
def self.up
add_column :tipos_movimientos, :codigo, :string
end
def self.down
remove_column :tipos_movimientos, :codigo
end
end
| Ruby |
class CreateDescripciones < ActiveRecord::Migration
def self.up
create_table :descripciones do |t|
t.text :texto
t.belongs_to :competencia
t.integer :junior
t.integer :senior
t.integer :master
t.decimal :peso, :precision => 10, :scale => 2
t.timestamps
end
... | Ruby |
class CreatePremiaciones < ActiveRecord::Migration
def self.up
create_table :premiaciones do |t|
t.references :funcionario
t.date :fecha
t.string :nivel_nombre
t.string :nivel_escala
t.timestamps
end
end
def self.down
drop_table :premiaciones
end
end
| Ruby |
class AddFotoColumnsToUsuario < ActiveRecord::Migration
def self.up
add_column :usuarios, :foto_file_name, :string
add_column :usuarios, :foto_content_type, :string
add_column :usuarios, :foto_file_size, :integer
add_column :usuarios, :foto_updated_at, :datetime
end
def self.... | Ruby |
class CreateMovimientos < ActiveRecord::Migration
def self.up
create_table :movimientos do |t|
t.date :fecha
t.references :usuario
t.references :tipo_movimiento
t.references :recibo
t.integer :valor
t.string :texto
t.string :documento
t.timestamps
end
add_i... | Ruby |
class AddDeletedAtToArea < ActiveRecord::Migration
def self.up
add_column :areas, :deleted_at, :timestamp
end
def self.down
remove_column :areas, :deleted_at
end
end
| Ruby |
class AddTelefonoToFamiliares < ActiveRecord::Migration
def self.up
add_column :familiares, :telefono, :string
end
def self.down
remove_column :familiares, :telefono
end
end
| Ruby |
class CreateUsuariosDatos < ActiveRecord::Migration
def self.up
create_table :usuarios_datos do |t|
t.string :filial
t.string :area
t.string :cargo
t.references :evaluacion
t.references :usuario
t.timestamps
end
end
def self.down
drop_table :usuarios_datos
end
e... | Ruby |
class AddDeletedAtToMarcacion < ActiveRecord::Migration
def self.up
add_column :marcaciones, :deleted_at, :datetime
change_column :marcaciones,:tipo,:integer,:default=>0,:limit=>1
end
def self.down
remove_column :marcaciones, :deleted_at
end
end
| Ruby |
class AddFechaNegociadaToUsuarios < ActiveRecord::Migration
def self.up
add_column :usuarios, :fecha_negociada, :date
end
def self.down
remove_column :usuarios, :fecha_negociada
end
end
| Ruby |
class CreateAcciones < ActiveRecord::Migration
def self.up
create_table :acciones do |t|
t.string :nombre
t.string :descripcion
t.references :modulo
t.timestamps
end
end
def self.down
drop_table :acciones
end
end
| Ruby |
class AddParametrizableIdAndParametrizableTypeToParametro < ActiveRecord::Migration
def self.up
add_column :parametros, :parametrizable_id, :integer
add_column :parametros, :parametrizable_type, :string
end
def self.down
remove_column :parametros, :parametrizable_type
remove_column :parametros, :... | Ruby |
class AddRetiroPremioToIncidente < ActiveRecord::Migration
def self.up
add_column :incidentes, :retiro_premio, :date
end
def self.down
remove_column :incidentes, :retiro_premio
end
end
| Ruby |
class CreateMensajes < ActiveRecord::Migration
def self.up
create_table :mensajes do |t|
t.text :texto
t.timestamps
end
end
def self.down
drop_table :mensajes
end
end
| Ruby |
class AddFilainicioToModelo < ActiveRecord::Migration
def self.up
add_column :modelos, :fila_inicio, :integer
end
def self.down
remove_column :modelos, :fila_inicio
end
end
| Ruby |
class CreateRespuestas < ActiveRecord::Migration
def self.up
create_table :respuestas do |t|
t.integer :valor
t.text :comentario
t.belongs_to :pregunta
t.belongs_to :usuario
t.timestamps
end
end
def self.down
drop_table :respuestas
end
end
| Ruby |
class CreateModelos < ActiveRecord::Migration
def self.up
create_table :modelos do |t|
t.string :nombre
t.integer :tipo
t.string :modelo
t.string :separador
t.boolean :encabezados
t.timestamps
end
end
def self.down
drop_table :modelos
end
end
| Ruby |
class AddCategoriaIdToHistoricoInterno < ActiveRecord::Migration
def self.up
add_column :historicos_internos, :categoria_id, :integer
end
def self.down
remove_column :historicos_internos, :categoria_id
end
end
| Ruby |
class CreateFactoresReconocimientos < ActiveRecord::Migration
def self.up
create_table :factores_reconocimientos do |t|
t.string :nombre
t.decimal :peso,:precision=>6,:scale=>2,:default=>1
t.text :descripcion
t.boolean :tipo,:default=>false
t.references :area
t.timestamps
... | Ruby |
class AddEscalableTypeAndEscalableIdToPuntuacionEscala < ActiveRecord::Migration
def self.up
add_column :puntuaciones_escalas, :escalable_type, :string
add_column :puntuaciones_escalas, :escalable_id, :integer
end
def self.down
remove_column :puntuaciones_escalas, :escalable_id
remove_column :pun... | Ruby |
class CreateSolicitudes < ActiveRecord::Migration
def self.up
create_table :solicitudes do |t|
t.string :nombre
t.date :desde
t.date :hasta
t.timestamps
end
end
def self.down
drop_table :solicitudes
end
end
| Ruby |
class AddAccionNueva < ActiveRecord::Migration
def self.up
mod = Modulo.find_by_nombre("usuarios")
mod.agregar_accion("actualizar", "Actualizar datos personales") if mod
end
def self.down
end
end
| Ruby |
class AddPuntosAcumuladosUtilizadosToPremiacion < ActiveRecord::Migration
def self.up
add_column :premiaciones, :puntos_acumulados_utilizados, :boolean,:default=>false
end
def self.down
remove_column :premiaciones, :puntos_acumulados_utilizados
end
end
| Ruby |
class AddFactorReconocimientoIdToIncidente < ActiveRecord::Migration
def self.up
add_column :incidentes, :factor_reconocimiento_id, :integer
end
def self.down
remove_column :incidentes, :factor_reconocimiento_id
end
end
| Ruby |
class AddColumnFechaToEvaluaciones < ActiveRecord::Migration
def self.up
add_column :evaluaciones, :fecha, :datetime
end
def self.down
remove_column :evaluaciones, :fecha, :datetime
end
end
| Ruby |
class CreateFranjas < ActiveRecord::Migration
def self.up
create_table :franjas do |t|
t.time :desde
t.time :hasta
t.integer :porcentaje
t.boolean :lunes
t.boolean :martes
t.boolean :miercoles
t.boolean :jueves
t.boolean :viernes
t.boolean :sabado
t.bool... | Ruby |
class AddTipoAndVerificadoAndAutorizacionIdToMarcacion < ActiveRecord::Migration
def self.up
add_column :marcaciones, :tipo, :integer
add_column :marcaciones, :verificado, :boolean
add_column :marcaciones, :autorizacion_id, :integer
end
def self.down
remove_column :marcaciones, :autorizacion_id
... | Ruby |
class RenameColumnClaseInPlanAccion < ActiveRecord::Migration
def self.up
rename_column(:planes_acciones, :clase, :clase_type)
end
def self.down
rename_column(:planes_acciones,:clase_type, :clase )
end
end
| Ruby |
class CreatePlantillas < ActiveRecord::Migration
def self.up
create_table :plantillas do |t|
t.string :nombre
t.text :descripcion
t.timestamps
end
end
def self.down
drop_table :plantillas
end
end
| Ruby |
class RemoveColumnsOnCompetencias < ActiveRecord::Migration
def self.up
remove_column :competencias, :descripcion
remove_column :competencias, :junior
remove_column :competencias, :senior
remove_column :competencias, :master
remove_column :competencias, :peso
end
def self.down
add_column... | Ruby |
class CreateProcesos < ActiveRecord::Migration
def self.up
create_table :procesos do |t|
t.string :nombre
t.timestamps
end
end
def self.down
drop_table :procesos
end
end
| Ruby |
class AddCarpetaIdToDocumentos < ActiveRecord::Migration
def self.up
add_column :documentos, :carpeta_id, :integer
end
def self.down
remove_column :documentos, :carpeta_id
end
end
| Ruby |
class AddTamanioToUniformeVestimenta < ActiveRecord::Migration
def self.up
add_column :uniformes_vestimentas, :tamanio, :string
end
def self.down
remove_column :uniformes_vestimentas, :tamanio
end
end
| Ruby |
class CreateCargosFactoresReconocimientos < ActiveRecord::Migration
def self.up
create_table :cargos_factores_reconocimientos,:id=>false do |t|
t.integer :cargo_id
t.integer :factor_reconocimiento_id
t.timestamps
end
end
def self.down
drop_table :cargos_factores_reconocimientos
en... | Ruby |
class AddDeletedAtToCargo < ActiveRecord::Migration
def self.up
add_column :cargos, :deleted_at, :timestamp
end
def self.down
remove_column :cargos, :deleted_at
end
end
| Ruby |
class CreateUsuariosPreguntas < ActiveRecord::Migration
def self.up
create_table :usuarios_preguntas do |t|
t.references :usuario
t.references :pregunta
t.decimal :resultado, :precision => 10, :scale => 2
t.timestamps
end
end
def self.down
drop_table :usuarios_preguntas
end... | Ruby |
class CreateTiposMovimientos < ActiveRecord::Migration
def self.up
create_table :tipos_movimientos do |t|
t.string :nombre
t.integer :tipo
t.timestamps
end
end
def self.down
drop_table :tipos_movimientos
end
end
| Ruby |
class AddEjecutadoPlanesAcciones < ActiveRecord::Migration
def self.up
add_column :planes_acciones, :ejecutado, :string
add_column :planes_acciones, :motivo_ejecutado, :string
add_column :planes_acciones, :motivo_efectivo, :string
end
def self.down
remove_column :planes_acciones, :motivo_efectivo... | Ruby |
class PlanesAccionesUsuarios < ActiveRecord::Migration
def self.up
create_table :planes_acciones_usuarios, :id => false do |t|
t.integer :usuario_id
t.integer :plan_accion_id
end
end
def self.down
drop_table :planes_acciones_usuarios
end
end
| Ruby |
class AddTipoContradoIdToHistoricosInternos < ActiveRecord::Migration
def self.up
add_column :historicos_internos, :tipo_contrato_id, :integer
end
def self.down
remove_column :historicos_internos, :tipo_contrato_id
end
end
| Ruby |
class CreateVestimentas < ActiveRecord::Migration
def self.up
create_table :vestimentas do |t|
t.string :nombre
t.timestamps
end
end
def self.down
drop_table :vestimentas
end
end
| Ruby |
class AddTipoDatoToColumna < ActiveRecord::Migration
def self.up
add_column :columnas, :tipo_dato, :integer
end
def self.down
remove_column :columnas, :tipo_dato
end
end
| Ruby |
class RemoveFechaFromFeriado < ActiveRecord::Migration
def self.up
Feriado.all.each do |f|
f.day=f.fecha.day
f.month=f.fecha.month
f.year=f.fecha.year
f.save!
end
remove_column :feriados, :fecha
end
def self.down
add_column :feriados, :fecha, :date
end
end
| Ruby |
class ChangeColumnNameToPlanAcciones < ActiveRecord::Migration
def self.up
rename_column :planes_acciones, :nombre, :accion_planificada
end
def self.down
rename_column :planes_acciones, :accion_planificada, :nombre
end
end
| Ruby |
class CreateSolicitudesDocumento < ActiveRecord::Migration
def self.up
create_table :solicitudes_documento do |t|
t.string :entidad
t.references :plantilla
t.date :fecha
t.references :usuario
t.text :motivo
t.boolean :realizado
t.timestamps
end
end
def self.down... | Ruby |
class AddSuperiorIdToIncidente < ActiveRecord::Migration
def self.up
add_column :incidentes, :superior_id, :integer
end
def self.down
remove_column :incidentes, :superior_id
end
end
| Ruby |
class ChangeEfectivoAndMotivoToText < ActiveRecord::Migration
def self.up
change_column :planes_acciones,:motivo_efectivo,:text
change_column :planes_acciones,:motivo_ejecutado,:text
end
end
| Ruby |
class CreateBancos < ActiveRecord::Migration
def self.up
create_table :bancos do |t|
t.string :nombre
t.timestamps
end
end
def self.down
drop_table :bancos
end
end
| Ruby |
class CreateFamiliares < ActiveRecord::Migration
def self.up
create_table :familiares do |t|
t.string :nombre
t.string :sexo
t.string :nacionalidad
t.string :profesion
t.string :trabajo
t.string :nivel
t.date :nacimiento
t.boolean :bonificacion
t.integer :pare... | Ruby |
class AddDayAndMonthAndYearToFeriado < ActiveRecord::Migration
def self.up
add_column :feriados, :day, :integer
add_column :feriados, :month, :integer
add_column :feriados, :year, :integer
end
def self.down
remove_column :feriados, :year
remove_column :feriados, :month
remove_column :feri... | Ruby |
class CreateMotivosSalidas < ActiveRecord::Migration
def self.up
create_table :motivos_salidas do |t|
t.string :nombre
t.timestamps
end
end
def self.down
drop_table :motivos_salidas
end
end
| Ruby |
class AddAttachmentsDocumentoToPlantilla < ActiveRecord::Migration
def self.up
add_column :plantillas, :documento_file_name, :string
add_column :plantillas, :documento_content_type, :string
add_column :plantillas, :documento_file_size, :integer
add_column :plantillas, :documento_updated_at, :datetime
... | Ruby |
class AddCampoenvioToUsuarios < ActiveRecord::Migration
def self.up
change_table :usuarios do |t|
t.boolean :enviar_email, :default => true
end
Usuario.update_all ["enviar_email = ?", true]
end
def self.down
remove_column :usuarios, :enviar_email
end
end
| Ruby |
class AddResponsableIdToHora < ActiveRecord::Migration
def self.up
add_column :horas, :responsable_id, :integer
end
def self.down
remove_column :horas, :responsable_id
end
end
| Ruby |
class AddDetalleToSolicitud < ActiveRecord::Migration
def self.up
add_column :solicitudes, :detalle, :text
end
def self.down
remove_column :solicitudes, :detalle
end
end
| Ruby |
class AddOrdenToCategorizaciones < ActiveRecord::Migration
def self.up
add_column :categorizaciones, :orden, :tinyint
end
def self.down
remove_column :categorizaciones, :orden
end
end
| Ruby |
class AddObservacionToVacacion < ActiveRecord::Migration
def self.up
add_column :vacaciones, :observacion, :string
end
def self.down
remove_column :vacaciones, :observacion
end
end
| Ruby |
class DeleteRetiroPremioFromIncidente < ActiveRecord::Migration
def self.up
remove_column(:incidentes, :retiro_premio)
end
def self.down
add_column(:incidentes, :retiro_premio,:date)
end
end
| Ruby |
class AddVacacionesNegociadasToUsuario < ActiveRecord::Migration
def self.up
add_column :usuarios, :vacaciones_negociadas, :integer
end
def self.down
remove_column :usuarios, :vacaciones_negociadas
end
end
| Ruby |
class CreateRecibos < ActiveRecord::Migration
def self.up
create_table :recibos do |t|
t.references :usuario
t.references :mensaje
t.decimal :valor_bruto, :precision => 12, :scale => 2
t.decimal :valor_neto, :precision => 12, :scale => 2
t.integer :mes, :anho
t.timestamps
... | Ruby |
class QuitarCamposDeHistoricoInterno < ActiveRecord::Migration
def self.up
remove_column :historicos_internos, :direccion
remove_column :historicos_internos, :telefono
remove_column :historicos_internos, :area_id
end
def self.down
add_column :historicos_internos, :direccion, :string
add_colum... | Ruby |
class CreatePreguntas < ActiveRecord::Migration
def self.up
create_table :preguntas do |t|
t.string :texto
t.belongs_to :competencia
t.belongs_to :evaluacion
t.timestamps
end
end
def self.down
drop_table :preguntas
end
end
| Ruby |
class AddTipoToMovimientos < ActiveRecord::Migration
def self.up
add_column :movimientos, :predefinido, :boolean
end
def self.down
remove_column :movimientos, :predefinido
end
end
| Ruby |
class CreatePerfiles < ActiveRecord::Migration
def self.up
create_table :perfiles do |t|
t.string :nombre
t.string :descripcion
t.timestamps
end
#Crear realacion HABTM
create_table :perfiles_usuarios, :id => false do |t|
t.integer :perfil_id, :usuario_id
end
end
de... | Ruby |
class AddPremiacionIdToIncidente < ActiveRecord::Migration
def self.up
add_column :incidentes, :premiacion_id, :integer
end
def self.down
remove_column :incidentes, :premiacion_id
end
end
| Ruby |
class CreateOpciones < ActiveRecord::Migration
def self.up
create_table :opciones do |t|
t.string :texto
t.integer :valor
t.belongs_to :pregunta
t.timestamps
end
end
def self.down
drop_table :opciones
end
end
| Ruby |
class AddColumnTipoEvaluadorToRespuestas < ActiveRecord::Migration
def self.up
add_column :respuestas, :tipo_evaluador, :string
end
def self.down
remove_column :respuestas, :tipo_evaluador
end
end
| Ruby |
class AddFactorReconocimientoIdToProceso < ActiveRecord::Migration
def self.up
add_column :procesos, :factor_reconocimiento_id, :integer
end
def self.down
remove_column :procesos, :factor_reconocimiento_id
end
end
| Ruby |
class AddVencimientoToExamenes < ActiveRecord::Migration
def self.up
add_column :examenes, :vencimiento, :integer
end
def self.down
remove_column :examenes, :vencimiento
end
end
| Ruby |
class AddNombreToPuntuacionEscala < ActiveRecord::Migration
def self.up
add_column :puntuaciones_escalas, :nombre, :string
end
def self.down
remove_column :puntuaciones_escalas, :nombre
end
end
| Ruby |
class AddRegistradorToIncidentes < ActiveRecord::Migration
def self.up
add_column :incidentes, :registrador_id, :integer
add_index :incidentes, :registrador_id
end
def self.down
remove_index :incidentes, :registrador_id
remove_column :incidentes, :registrador_id
end
end
| Ruby |
class CreateCargos < ActiveRecord::Migration
def self.up
create_table :cargos do |t|
t.string :nombre
t.references :area
t.text :objetivos
t.string :nivel
t.integer :supervisa_id
t.integer :reporta_id
t.integer :valoracion
t.timestamps
end
end
def self.dow... | Ruby |
class CreateAccesos < ActiveRecord::Migration
def self.up
create_table :accesos do |t|
t.references :perfil
t.references :modulo
t.timestamps
end
end
def self.down
drop_table :accesos
end
end
| Ruby |
class AddColumnCargoToPreguntas < ActiveRecord::Migration
def self.up
add_column :preguntas, :cargo_id, :integer
end
def self.down
remove_column :preguntas, :cargo_id
end
end
| Ruby |
class AddMensajeToRecibo < ActiveRecord::Migration
def self.up
add_column :recibos, :mensaje, :text
remove_column :recibos, :mensaje_id
end
def self.down
add_column :recibos, :mensaje_id
remove_column :recibos, :mensaje
end
end
| Ruby |
class AddMotivoNegociadaToUsuario < ActiveRecord::Migration
def self.up
add_column :usuarios, :motivo_negociada, :text
end
def self.down
remove_column :usuarios, :motivo_negociada
end
end
| Ruby |
class AddJustaCausaToHistoricoInterno < ActiveRecord::Migration
def self.up
add_column :historicos_internos, :justa_causa, :boolean
end
def self.down
remove_column :historicos_internos, :justa_causa
end
end
| Ruby |
class AddAfectadoIdToPlanAccion < ActiveRecord::Migration
def self.up
add_column :planes_acciones, :afectado_id, :integer
end
def self.down
remove_column :planes_acciones, :afectado_id
end
end
| Ruby |
class AddFiltrosToColumna < ActiveRecord::Migration
def self.up
add_column :columnas, :incluir, :string
add_column :columnas, :excluir, :string
end
def self.down
remove_column :columnas, :incluir
remove_column :columnas, :incluir
end
end
| Ruby |
class CreateTiposCursos < ActiveRecord::Migration
def self.up
create_table :tipos_cursos do |t|
t.string :nombre
t.timestamps
end
end
def self.down
drop_table :tipos_cursos
end
end
| Ruby |
class CreateCorrientes < ActiveRecord::Migration
def self.up
create_table :corrientes do |t|
t.references :banco
t.references :empresa
t.string :cuenta_numero
t.timestamps
end
end
def self.down
drop_table :corrientes
end
end
| Ruby |
class CreateHistoricosExternos < ActiveRecord::Migration
def self.up
create_table :historicos_externos do |t|
t.integer :usuario_id
t.string :empresa
t.string :cargo
t.decimal :salario
t.string :jefe
t.string :direccion
t.string :telefono
t.date :desde
t.date ... | Ruby |
class RemoveJefeFromHistoricoInterno < ActiveRecord::Migration
def self.up
remove_column :historicos_internos, :jefe
end
def self.down
add_column :historicos_internos, :jefe,:string
end
end
| Ruby |
class AddNombreToPredefinido < ActiveRecord::Migration
def self.up
add_column :predefinidos, :nombre, :string
end
def self.down
remove_column :predefinidos, :nombre
end
end
| Ruby |
class AddDescripcionPremioToPremiacion < ActiveRecord::Migration
def self.up
add_column :premiaciones, :descripcion_premio, :text
end
def self.down
remove_column :premiaciones, :descripcion_premio
end
end
| Ruby |
class CreateUniformes < ActiveRecord::Migration
def self.up
create_table :uniformes do |t|
t.integer :usuario_id
t.string :tamanio
t.timestamps
end
end
def self.down
drop_table :uniformes
end
end
| Ruby |
class AddTerminadaToEvaluacion < ActiveRecord::Migration
def self.up
add_column :evaluaciones, :terminada, :boolean
end
def self.down
remove_column :evaluaciones, :terminada
end
end
| Ruby |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.