Sha256: bcf3433863bceef00ccf3e2bcdf65942488b4eb1b9d6e12651c829afcba7ae27

Contents?: true

Size: 914 Bytes

Versions: 6

Compression:

Stored size: 914 Bytes

Contents

class CreateTestTables < ActiveRecord::Migration
  def change
    create_table :users do |t|
      # Devise
      ## Database authenticatable
      t.string :email,              null: false, default: "", index: true, unique: true
      t.string :encrypted_password, null: false, default: ""
      ## Confirmable
      t.string   :confirmation_token
      t.datetime :confirmed_at
      t.datetime :confirmation_sent_at
      # Apps
      t.string   :name

      t.timestamps
    end

    create_table :admins do |t|
      t.references :user, index: true

      t.timestamps
    end

    create_table :articles do |t|
      t.references :user, index: true
      t.string     :title
      t.string     :body

      t.timestamps
    end

    create_table :comments do |t|
      t.references :user,    index: true
      t.references :article, index: true
      t.string     :body

      t.timestamps
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
activity_notification-1.1.0 spec/rails_app/db/migrate/20160715050433_create_test_tables.rb
activity_notification-1.0.2 spec/rails_app/db/migrate/20160715050433_create_test_tables.rb
activity_notification-1.0.1 spec/rails_app/db/migrate/20160715050433_create_test_tables.rb
activity_notification-1.0.0 spec/rails_app/db/migrate/20160715050433_create_test_tables.rb
activity_notification-0.0.10 spec/rails_app/db/migrate/20160715050433_create_test_tables.rb
activity_notification-0.0.9 spec/rails_app/db/migrate/20160715050433_create_test_tables.rb