Sha256: b5e0e9366fca32610926c5833b741e3faeb40046443edf010aa06fc693d7c215

Contents?: true

Size: 445 Bytes

Versions: 2

Compression:

Stored size: 445 Bytes

Contents

class CreateApiClients < ActiveRecord::Migration
  def change
    create_table :api_clients do |t|
      t.string :name, null: false
      t.column :key, "uuid default uuid_generate_v4()", null: false
      t.column :enabled, :bool, null: false, default: true
      t.column :created_at, "timestamp with time zone default now()", null: false
    end
    add_index :api_clients, [:name]
    add_index :api_clients, [:key], unique: true
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stitches-3.4.0 lib/stitches/generator_files/db/migrate/create_api_clients.rb
stitches-3.3.0 lib/stitches/generator_files/db/migrate/create_api_clients.rb