Class: CreateBytes
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateBytes
- Defined in:
- lib/db/migrate/011_create_bytes.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
16 17 18 |
# File 'lib/db/migrate/011_create_bytes.rb', line 16 def self.down drop_table :bytes end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/db/migrate/011_create_bytes.rb', line 2 def self.up create_table "bytes", force: :cascade do |t| t.integer "index", null: false t.text "value", null: false t.text "description" t.integer "iteration" t.integer "command_id", limit: 4, null: false end add_index "bytes", ["command_id"], name: "index_bytes_on_command_id", using: :btree add_foreign_key "bytes", "commands" end |