TrestleAdmin/trestle

View on GitHub
sandbox/db/migrate/20210713021857_create_articles.rb

Summary

Maintainability
A
0 mins
Test Coverage
class CreateArticles < ActiveRecord::Migration[6.1]
  def change
    create_table :articles do |t|
      t.string :title
      t.text :content

      t.datetime :published_at
      t.boolean :active, default: false
      t.text :tags

      t.references :author

      t.timestamps
    end
  end
end