Sha256: a02475a4056cd83b932c9e70b28a6ec52ab05e1022dec3233d752bc5ed980ea7
Contents?: true
Size: 1.1 KB
Versions: 6
Compression:
Stored size: 1.1 KB
Contents
class CreateApprovalTables < ActiveRecord::Migration[5.0] def change create_table :approval_requests do |t| t.integer :request_user_id, null: false t.integer :respond_user_id t.integer :state, null: false, limit: 1, default: 0 t.datetime :requested_at, null: false t.datetime :cancelled_at t.datetime :approved_at t.datetime :rejected_at t.datetime :executed_at t.timestamps t.index :request_user_id t.index :respond_user_id t.index :state end create_table :approval_items do |t| t.integer :request_id, null: false t.integer :resource_id t.string :resource_type, null: false t.string :event, null: false t.text :params t.timestamps t.index :request_id t.index [:resource_id, :resource_type] end create_table :approval_comments do |t| t.integer :request_id, null: false t.integer :user_id, null: false t.text :content, null: false t.timestamps t.index :request_id t.index :user_id end end end
Version data entries
6 entries across 6 versions & 1 rubygems