Sha256: ed21f3cb3b31f110ced72c495ac0163061c31b971bdb28fc1358b091a62562ee

Contents?: true

Size: 342 Bytes

Versions: 2

Compression:

Stored size: 342 Bytes

Contents

Sequel.migration do
  change do
    create_table(:keywords) do
      primary_key :id
      String :name, null: false, unique: true
    end

    create_table(:keywords_photos) do
      Integer :photo_id, null: false
      Integer :keyword_id, null: false
      primary_key [:photo_id, :keyword_id], name: :keywords_photos_pk
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
piccle-0.1.1.pre db/migrations/003_create_keywords_and_join_table.rb
piccle-0.1.0.rc1 db/migrations/003_create_keywords_and_join_table.rb