Sha256: fedfa56905708461abc12c29e6bf4bdf66dc88a9fa08cf236d1bc00ba13833fc
Contents?: true
Size: 449 Bytes
Versions: 33
Compression:
Stored size: 449 Bytes
Contents
class ReplaceIdByZip < ActiveRecord::Migration def self.up create_table(:zips, :id=>false, :options => Zena::Db.table_options) do |t| t.column :site_id, :integer t.column :zip, :integer end add_column :nodes, :zip, :integer end def self.down drop_table :zips remove_column :nodes, :zip end end # FIXME: use mysql sequence: UPDATE zip_counter SET zip=@zip:=zip+1 WHERE site_id = '#{site[:id]}'; select @zip;
Version data entries
33 entries across 33 versions & 1 rubygems