radar/twist-v2

View on GitHub
backend/db/migrate/20180319055837_create_images.rb

Summary

Maintainability
A
35 mins
Test Coverage
ROM::SQL.migration do
  change do
    create_table :images do
      primary_key :id
      column :filename, String
      column :image_data, String

      foreign_key :chapter_id, :chapters, on_delete: :cascade, null: false

      column :created_at, DateTime, null: false
      column :updated_at, DateTime, null: false
    end
  end
end