Sha256: 0b76892083efacfad52628a24398ab129508c6c25221da9de61268e578ce7918

Contents?: true

Size: 616 Bytes

Versions: 6

Compression:

Stored size: 616 Bytes

Contents

class CreateApiClients < ActiveRecord::Migration<% if Rails::VERSION::MAJOR >= 5 %>[<%= Rails::VERSION::MAJOR %>.<%= Rails::VERSION::MINOR %>]<% end %>
  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
      t.column :disabled_at, "timestamp with time zone", null: true
    end
    add_index :api_clients, [:name]
    add_index :api_clients, [:key], unique: true
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
stitches-5.0.0 lib/stitches/generator_files/db/migrate/create_api_clients.rb
stitches-5.0.0.RC1 lib/stitches/generator_files/db/migrate/create_api_clients.rb
stitches-4.2.2 lib/stitches/generator_files/db/migrate/create_api_clients.rb
stitches-4.2.1 lib/stitches/generator_files/db/migrate/create_api_clients.rb
stitches-4.2.0 lib/stitches/generator_files/db/migrate/create_api_clients.rb
stitches-4.2.0.RC3 lib/stitches/generator_files/db/migrate/create_api_clients.rb