Sha256: 59439bd3eb910bf40a5ac953c79296d58a2ec16b098598b87890a0b2ee491c7c

Contents?: true

Size: 265 Bytes

Versions: 11

Compression:

Stored size: 265 Bytes

Contents

class CreateTags < ActiveRecord::Migration
  def change
    create_table :tags do |t|

      t.string :name, null: false
      t.timestamps
    end

    add_index :tags, :name, unique: true

    add_column :posts, :tags, :integer, array: true, defaut: []
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ecrire-0.27.0 lib/ecrire/db/migrate/20150318549479_create_tags.rb
ecrire-0.26.3 lib/ecrire/db/migrate/20150318549479_create_tags.rb
ecrire-0.26.2 lib/ecrire/db/migrate/20150318549479_create_tags.rb
ecrire-0.26.1 lib/ecrire/db/migrate/20150318549479_create_tags.rb
ecrire-0.26.0 lib/ecrire/db/migrate/20150318549479_create_tags.rb
ecrire-0.25.2 lib/ecrire/db/migrate/20150318549479_create_tags.rb
ecrire-0.25.1 lib/ecrire/db/migrate/20150318549479_create_tags.rb
ecrire-0.25.0 lib/ecrire/db/migrate/20150318549479_create_tags.rb
ecrire-0.24.1 lib/ecrire/db/migrate/20150318549479_create_tags.rb
ecrire-0.24.0 lib/ecrire/db/migrate/20150318549479_create_tags.rb
ecrire-0.23.0 lib/ecrire/db/migrate/20150318549479_create_tags.rb