code stringlengths 1 1.73M | language stringclasses 1
value |
|---|---|
class MovimientoController < ApplicationController
def index
conditions = {}
conditions[:user_id] = session[:user]
@movimientos = MovimientoAlmacen.paginate :page => params[:page],
:per_page => DEFAULT_PER_PAGE, :order => 'id', :conditions => conditions
end
def entrada
@movimient... | Ruby |
class RequisicionController < ApplicationController
def index
# ejecutivo
if perfil_ejecutivo?
ejecutivo
elsif mando_medio?
mando_medio
elsif perfil_asistente?
asistente
render :action => 'asistente'
elsif perfil_captura?
else
@re... | Ruby |
class ListaPrecioController < ApplicationController
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],
:redirect_to => { :action => :list }
def index
list
render :action => 'list'
end
def li... | Ruby |
class LoginController < ApplicationController
def authenticate
ejecutivo = Ejecutivo.authenticate(params[:usuario].to_s, params[:clave].to_s)
# ejecutivo = Ejecutivo.authenticate('rpadilla', 'dummy')
# ejecutivo = Ejecutivo.authenticate('darnauda', 'dummy')
unless ejecutivo.blank?
session... | Ruby |
class ComodatoController < ApplicationController
def index
list
end
def list
ejecutivo = Ejecutivo.find(session[:user])
children = ejecutivo.all_active_children
@comodatos = BienComodato.paginate :page => params[:page],
:per_page => DEFAULT_PER_PAGE, :order => 'id', :conditions =... | Ruby |
# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
# Pick a unique cookie name to distinguish our session data from others'
session :session_key => '_catalogos_... | Ruby |
class Evaluacion::PremioController < ApplicationController
def list
@concurso = Concurso.find(params[:id])
opciones = {}
opciones[:concurso_id] = params[:id]
if !perfil_nacional?
opciones[:ejecutivo_id] = session[:user]
end
@evaluaciones = Evaluacion.paginate :page => p... | Ruby |
class Evaluacion::VentaController < ApplicationController
def list
@concurso = Concurso.find(params[:id])
opciones = {}
opciones[:concurso_id] = params[:id]
if !perfil_nacional?
opciones[:ejecutivo_id] = session[:user]
end
@evaluaciones = Evaluacion.paginate :page => pa... | Ruby |
class Evaluacion::ObjetivoController < ApplicationController
def list
@concurso = Concurso.find(params[:id])
conditions = {}
conditions[:concurso_id] = params[:id]
if !perfil_nacional?
conditions[:ejecutivo_id] = session[:user]
end
@evaluaciones = Evaluacion.paginate :page => ... | Ruby |
class FacturaController < ApplicationController
def index
list
render :action => 'list'
end
def list
@facturas = Factura.paginate :page => params[:page], :per_page => DEFAULT_PER_PAGE, :order => 'fecha_factura DESC'
end
def new
@factura = Factura.new(:referencia => nil,
:ejecutivo_id... | Ruby |
class SalidaController < ApplicationController
def list
if perfil_nacional?
@ordenes = OrdenSalida.paginate :page => params[:page], :per_page => DEFAULT_PER_PAGE, :order => 'created_at DESC'
else
ejecutivos = find_children_ids(Ejecutivo.find(session[:user]))
conditions = [
"eje... | Ruby |
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/breakpointer' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/console' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/runner' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/performance/benchmarker'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/performance/benchmarker'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/performance/profiler'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/performance/profiler'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/plugin' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/destroy' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/about' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/runner' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/breakpointer' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/server' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/generate' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/console' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/reaper'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/inspector'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/inspector'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/spawner'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/reaper'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../../config/boot'
require 'commands/process/spawner'
| Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/destroy' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/generate' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/server' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/about' | Ruby |
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
require 'commands/plugin' | Ruby |
class AddBonificacionDetalleReferencias < ActiveRecord::Migration
def self.up
add_column :bonificacion_detalles, :partida_id, :integer
add_column :bonificacion_detalles, :fecha_bonificacion, :datetime
end
def self.down
remove_column :bonificacion_detalles, :partida_id
remove_column :bonificacion_... | Ruby |
class CreateApoyoProductos < ActiveRecord::Migration
def self.up
create_table :apoyo_productos do |t|
t.column :promocion_id, :integer
t.column :producto_id, :integer
t.column :cantidad, :integer
end
end
def self.down
drop_table :apoyo_productos
end
end
| Ruby |
class CreateBusquedaConvenios < ActiveRecord::Migration
def self.up
sql = "CREATE VIEW busqueda_convenios AS SELECT centros.convenios.id, centros.convenios.fecha_inicio, centros.convenios.fecha_termino, centros.convenios.tipo_participante, "+
"centros.convenios.participante_id, centros.convenios.ejecuti... | Ruby |
class AddPdfsStoredProcedures < ActiveRecord::Migration
def self.up
execute "CREATE PROCEDURE [centros].[DetalleBonificacionesConvenio] \n" +
"@ConvenioId int = -1 \n" +
"AS BEGIN \n" +
"SET NOCOUNT ON \n" +
" SELECT centros.entradas_catalogos.valor AS Marca, centros.bonificaciones.porcent... | Ruby |
class AddCentroMarcaBanderaId < ActiveRecord::Migration
def self.up
add_column :centros, :marca_bandera_id, :integer
end
def self.down
remove_column :centros, :marca_bandera_id
end
end
| Ruby |
class AddDiversasColumnas < ActiveRecord::Migration
def self.up
add_column :productos, :empresa, :integer
add_column :detalle_facturas, :cajas_9lt, :decimal, :scale => 2, :precision => 10
end
def self.down
remove_column :detalle_facturas, :cajas_9lt
remove_column :productos, :empresa
end
end
| Ruby |
class CreateObjetivoMensuales < ActiveRecord::Migration
def self.up
create_table :objetivo_mensuales do |t|
t.column :convenio_id, :integer
t.column :familia_id, :integer, :null => false
t.column :marca_id, :integer
t.column :objetivo_mensual, :integer
end
end
def se... | Ruby |
class AddConveniosFechas < ActiveRecord::Migration
def self.up
add_column :convenios, :created_at, :datetime
add_column :convenios, :updated_at, :datetime
end
def self.down
remove_column :convenios, :updated_at
remove_column :convenios, :created_at
end
end
| Ruby |
class AddConcursoPremiosConcursoId < ActiveRecord::Migration
def self.up
add_column :concurso_premios, :concurso_id, :integer
end
def self.down
remove_column :concurso_premios, :concurso_id
end
end
| Ruby |
class CreateItemMovimientos < ActiveRecord::Migration
def self.up
create_table :item_movimientos do |t|
t.column :movimiento_almacen_id, :integer
t.column :cantidad, :integer
t.column :unidad_medida_id, :integer
t.column :producto_id, :integer
t.column :created_at, :datetime
t.... | Ruby |
class CreateListaPrecios < ActiveRecord::Migration
def self.up
create_table :lista_precios do |t|
t.column :producto_id, :integer
t.column :litraje_mls, :integer
t.column :precio_normal, :decimal
t.column :precio_minimo, :decimal
t.column :precio_maximo, :decimal
end
... | Ruby |
class CreatePromociones < ActiveRecord::Migration
def self.up
create_table :promociones do |t|
t.column :centro_id, :integer
t.column :ejecutivo_id, :integer
t.column :fecha_evento, :datetime
t.column :tipo_evento_id, :integer
t.column :nombre, :string
t.column :marca_id, :inte... | Ruby |
class RemoveCentroEspecialidadId < ActiveRecord::Migration
def self.up
remove_column :centros, :especialidad_id
end
def self.down
add_column :centros, :especialidad_id, :integer
end
end
| Ruby |
class AddConvenioFechaTermino < ActiveRecord::Migration
def self.up
add_column :convenios, :fecha_termino, :datetime
end
def self.down
remove_column :convenios, :fecha_termino
end
end
| Ruby |
class UpdateFacturasFechaProceso < ActiveRecord::Migration
def self.up
add_column :facturas, :fecha_proceso, :datetime
add_column :detalle_facturas, :fecha_proceso, :datetime
end
def self.down
remove_column :facturas, :fecha_proceso
remove_column :detalle_facturas, :fecha_proceso
end
end
| Ruby |
class CreateSolicitudMateriales < ActiveRecord::Migration
def self.up
create_table :solicitud_materiales do |t|
t.column :presencia_id, :integer
t.column :centro_id, :integer
t.column :marca_id, :integer
t.column :tipo_presupuesto_id, :integer
t.column :descripcion, :text
... | Ruby |
class AddEvaluacionObjetivosPuntosAsignados < ActiveRecord::Migration
def self.up
add_column :evaluacion_objetivos, :puntos_asignados, :integer
end
def self.down
remove_column :evaluacion_objetivos, :puntos_asignados
end
end
| Ruby |
class AddConveniosEjecutivo < ActiveRecord::Migration
def self.up
add_column :convenios, :ejecutivo_id, :integer
end
def self.down
remove_column :convenios, :ejecutivo_id
end
end
| Ruby |
class CreateCanjeDetalles < ActiveRecord::Migration
def self.up
create_table :canje_detalles do |t|
t.column :canje_id, :integer
t.column :producto_id, :integer
t.column :puntos_canje, :integer
t.column :precio, :decimal, :precision => 10, :scale => 2
t.column :costo, :decimal, :prec... | Ruby |
class CreatePresencias < ActiveRecord::Migration
def self.up
create_table :presencias do |t|
t.column :centro_id, :integer
t.column :marca_id, :integer
t.column :tipo_presupuesto_id, :integer
t.column :descripcion, :text
t.column :ejecutivo_id, :integer
t.column :importe_... | Ruby |
class AddOrdenSalidaPresupuestosOrdenId < ActiveRecord::Migration
def self.up
add_column :orden_salida_presupuestos, :orden_salida_id, :integer
end
def self.down
remove_column :orden_salida_presupuestos, :orden_salida_id
end
end
| Ruby |
class CreateBusquedaFacturas < ActiveRecord::Migration
def self.up
sql = "CREATE VIEW busqueda_facturas AS SELECT centros.facturas.id, centros.facturas.fecha_factura, centros.facturas.referencia, centros.centros.nombre_comercial AS centro_consumo, " +
"centros.mayoristas.nombre AS mayorista, ISNULL(centros.facturas.r... | Ruby |
class AddEntradasCatalogosAlternateId < ActiveRecord::Migration
def self.up
add_column :entradas_catalogos, :alternate_id, :integer, :null => true, :default => nil
end
def self.down
remove_column :entradas_catalogos, :alternate_id
end
end
| Ruby |
class CreateApoyoMateriales < ActiveRecord::Migration
def self.up
create_table :apoyo_materiales do |t|
t.column :material_id, :integer
t.column :costo_unitario, :decimal
t.column :cantidad, :integer
t.column :promocion_id, :integer
end
end
def self.down
drop_table :apoyo_mate... | Ruby |
class AddEmpleadosNumeroEmpleado < ActiveRecord::Migration
def self.up
add_column :ejecutivos, :numero_empleado, :string
end
def self.down
remove_column :ejecutivos, :numero_empleado
end
end
| Ruby |
class AddCentroEmpleados < ActiveRecord::Migration
def self.up
add_column :empleados, :centro_id, :integer, :default => nil
end
def self.down
remove_column :empleados, :centro_id
end
end
| Ruby |
class CreateBusquedaCentros < ActiveRecord::Migration
def self.up
sql = "CREATE VIEW busqueda_centros AS SELECT centros.centros.id, centros.centros.ejecutivo_id, centros.centros.nombre_comercial, centros.centros.razon_social, centros.centros.nombre_contacto, " +
"ISNULL(centros.centros.nombre_comercial... | Ruby |
class CreateProductos < ActiveRecord::Migration
def self.up
create_table :productos do |t|
t.column :descripcion, :string
t.column :sociedad_id, :integer
t.column :grupo_articulo_id, :integer
end
end
def self.down
drop_table :productos
end
end
| Ruby |
class CreateEvaluacionObjetivos < ActiveRecord::Migration
def self.up
create_table :evaluacion_objetivos do |t|
t.column :evaluacion_id, :integer
t.column :objetivo, :string
t.column :puntos_otorgados, :integer
end
end
def self.down
drop_table :evaluacion_objetivos
end
end
| Ruby |
class CreatePresupuestos < ActiveRecord::Migration
def self.up
create_table :presupuestos do |t|
t.column :centro_id, :integer
t.column :ejecutivo_id, :integer
t.column :marca_id, :integer
t.column :rubro_id, :integer
t.column :saldo_inicial, :decimal, :precision => 12, :scale => 2, ... | Ruby |
class UpdateDetalleFacturasColumns < ActiveRecord::Migration
def self.up
# quitar columnas obsoletas
remove_column :detalle_facturas, :precio_unitario
remove_column :detalle_facturas, :litraje_mls
#agregar nuevas columnas requeridas
add_column :detalle_facturas, :precio_venta, :decimal, :prec... | Ruby |
class CreateCorporativos < ActiveRecord::Migration
def self.up
create_table :corporativos do |t|
t.column :nombre_comercial, :string, :limit => 40, :null => false
t.column :razon_social, :string, :limit => 40, :null => false
t.column :rfc, :string, :limit => 15, :null => false
t.column :fe... | Ruby |
class RemoveListaPrecios < ActiveRecord::Migration
def self.up
drop_table :lista_precios
end
def self.down
create_table :lista_precios do |t|
t.column :producto_id, :integer
t.column :litraje_mls, :integer
t.column :precio_normal, :decimal
t.column :precio_minimo, :decimal... | Ruby |
class CreateBusquedaOrdenSalidas < ActiveRecord::Migration
def self.up
sql="CREATE VIEW busqueda_orden_salidas AS SELECT centros.orden_salidas.id, centros.orden_salidas.centro_id, centros.centros.nombre_comercial, "+
"centros.orden_salidas.tipo_referencia,centros.orden_salidas.referencia_id, centros.orden_s... | Ruby |
class AddProductosClaveIndex < ActiveRecord::Migration
def self.up
add_index :productos, :clave
end
def self.down
remove_index :productos, :clave
end
end
| Ruby |
class AddPresenciaExhibicionesCosto < ActiveRecord::Migration
def self.up
add_column :presencia_exhibiciones, :costo, :decimal, :precision => 10, :scale => 2
add_column :presencia_exhibiciones, :precio, :decimal, :precision => 10, :scale => 2
end
def self.down
remove_column :presencia_exhibicio... | Ruby |
class AddProductosPresentacionId < ActiveRecord::Migration
def self.up
add_column :productos, :presentacion_id, :integer
end
def self.down
remove_column :productos, :presentacion_id
end
end
| Ruby |
class CreateCentros < ActiveRecord::Migration
def self.up
create_table :centros do |t|
t.column :nombre_comercial, :string, :null => false, :limit => 40
t.column :razon_social, :string, :null => false, :limit => 40
t.column :rfc, :string, :null => false, :limit => 15
t.column :fecha_aniver... | Ruby |
class CreateEjecutivos < ActiveRecord::Migration
def self.up
create_table :ejecutivos do |t|
t.column :nombre, :string, :limit => 40, :null => false
t.column :primer_apellido, :string, :limit => 40, :null => false
t.column :segundo_apellido, :string, :limit => 40
t.column :usuario, :string... | Ruby |
class AddEjecutivoAlmacen < ActiveRecord::Migration
def self.up
add_column :ejecutivos, :almacen_id, :integer
end
def self.down
remove_column :ejecutivos, :almacen_id
end
end
| Ruby |
class CreateEvaluacionPremios < ActiveRecord::Migration
def self.up
create_table :evaluacion_premios do |t|
t.column :evaluacion_id, :integer
t.column :participante_id, :integer, :null => false
t.column :marca_id, :integer, :null => false
t.column :venta_copas, :integer, :null => false
... | Ruby |
class CreateSalidaMateriales < ActiveRecord::Migration
def self.up
create_table :salida_materiales do |t|
t.column :ejecutivo_id, :integer
t.column :centro_id, :integer
t.column :observaciones, :text
t.column :importe, :decimal, :precision => 12, :scale => 2
t.column :created_at, :da... | Ruby |
class ChangeBonificacionDetallesVolumen < ActiveRecord::Migration
def self.up
remove_column :bonificacion_detalles, :volumen
add_column :bonificacion_detalles, :volumen, :decimal, :precision => 10, :scale => 2
end
def self.down
remove_column :bonificacion_detalles, :volumen
add_column :bonificaci... | Ruby |
class RemoveBonificacionesAplicableA < ActiveRecord::Migration
def self.up
remove_column :bonificaciones, :aplicable_a
end
def self.down
add_column :bonificaciones, :aplicable_a, :integer, :default => 1
end
end
| Ruby |
class CreateConcursoVentas < ActiveRecord::Migration
def self.up
create_table :concurso_ventas do |t|
t.column :concurso_id, :integer, :null => false
t.column :marca_id, :integer, :null => false
t.column :puntos_copa, :integer
t.column :puntos_botella, :integer
end
end
... | Ruby |
class CreatePresenciaExhibiciones < ActiveRecord::Migration
def self.up
create_table :presencia_exhibiciones do |t|
t.column :presencia_id, :integer
t.column :producto_id, :integer
t.column :cantidad, :integer
t.column :en_atencion_a, :string
t.column :observaciones, :text
end
... | Ruby |
class CreateBusquedaPresencias < ActiveRecord::Migration
def self.up
sql="CREATE VIEW busqueda_presencias AS SELECT centros.presencias.id, centros.presencias.centro_id, centros.presencias.nombre, centros.presencias.ejecutivo_id, centros.presencias.created_at, "+
"centros.presencias.status_id, centros.centro... | Ruby |
class AddBonificacionesObjetivo < ActiveRecord::Migration
def self.up
add_column :bonificaciones, :objetivo_mensual, :integer
end
def self.down
remove_column :bonificaciones, :objetivo_mensual
end
end
| Ruby |
class AddFacturasUserId < ActiveRecord::Migration
def self.up
add_column :facturas, :user_id, :integer
end
def self.down
remove_column :facturas, :user_id
end
end
| Ruby |
class CreateEmpleados < ActiveRecord::Migration
def self.up
create_table :empleados do |t|
t.column :nombre, :string, :limit => 40, :null => false
t.column :primer_apellido, :string, :limit => 40, :null => false
t.column :segundo_apellido, :string, :limit => 40
t.column :fecha_nacimiento, ... | Ruby |
class AddVCorteMensual < ActiveRecord::Migration
def self.up
sql = "CREATE VIEW v_corte_mensual AS SELECT CONVERT(varchar, YEAR(centros.bonificacion_detalles.fecha_bonificacion)) + '/' + CONVERT(varchar, " +
"MONTH(centros.bonificacion_detalles.fecha_bonificacion)) AS month_bonificacion, centros.bonificacio... | Ruby |
class AddEntradaValorParentValueId < ActiveRecord::Migration
def self.up
add_column :entradas_catalogos, :parent_value_id, :integer, :default => nil, :null => true
end
def self.down
remove_column :entradas_catalogos, :parent_value_id
end
end
| Ruby |
class AddPromocionPresupuestos < ActiveRecord::Migration
def self.up
add_column :promociones, :presupuesto_producto_id, :integer
add_column :promociones, :presupuesto_apoyo_id, :integer
end
def self.down
remove_column :promociones, :presupuesto_apoyo_id
remove_column :promociones, :presupuesto_pr... | Ruby |
class AddCentrosRegion < ActiveRecord::Migration
def self.up
add_column :centros , :region_id, :integer
end
def self.down
remove_column :centros, :region_id
end
end
| Ruby |
class CreateDetalleFacturas < ActiveRecord::Migration
def self.up
create_table :detalle_facturas do |t|
t.column :factura_id, :integer, :null => false
t.column :producto_id, :integer, :null => false
t.column :unidades, :integer, :null => false
t.column :precio_unitario, :decima... | Ruby |
class RemoveGrupoArticulos < ActiveRecord::Migration
def self.up
drop_table :grupo_articulos
end
def self.down
create_table :grupo_articulos do |t|
t.column :descripcion, :string
t.column :sector_id, :integer
t.column :categoria_id, :integer
end
end
end
| Ruby |
class CreateMarcas < ActiveRecord::Migration
def self.up
create_table :marcas do |t|
t.column :familia_id, :integer
t.column :empresa_id, :integer
t.column :categoria_id, :integer
t.column :nombre, :string
t.column :status_id, :integer
t.column :created_at, :datetime
t.co... | Ruby |
class CreateExistencias < ActiveRecord::Migration
def self.up
create_table :existencias do |t|
t.column :almacen_id, :integer
t.column :producto_id, :integer
t.column :cantidad, :integer
t.column :created_at, :datetime
t.column :updated_at, :datetime
t.column :user_id, :integer... | Ruby |
class CreateBonificacionDetalles < ActiveRecord::Migration
def self.up
create_table :bonificacion_detalles do |t|
t.column :centro_id, :integer
t.column :convenio_id, :integer
t.column :destino_id, :integer
t.column :volumen, :float
t.column :operacion, :integer
t.column :impor... | Ruby |
class CreateMovimientoAlmacenes < ActiveRecord::Migration
def self.up
create_table :movimiento_almacenes do |t|
t.column :referencia, :string
t.column :tipo_movimiento_id, :integer
t.column :almacen_id, :integer
t.column :created_at, :datetime
t.column :updated_at, :datetime
t.... | Ruby |
class AddPresenciasNombre < ActiveRecord::Migration
def self.up
add_column :presencias, :nombre, :string
end
def self.down
remove_column :presencias, :nombre
end
end
| Ruby |
class AddCorporativoEjecutivo < ActiveRecord::Migration
def self.up
add_column :corporativos, :ejecutivo_id, :integer
end
def self.down
remove_column :corporativos, :ejecutivo_id
end
end
| Ruby |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.