Sha256: 5e689dc1fc083699af9f9103cf94869137c07d47aadc1ed5e1374f22bfbc529e

Contents?: true

Size: 373 Bytes

Versions: 3

Compression:

Stored size: 373 Bytes

Contents

# frozen_string_literal: true

class CreateCreatedIds < ActiveRecord::Migration[5.0]
  def up
    create_table :created_ids do |t|
      t.string :class_name, null: false, limit: 100
      t.datetime :hour, null: false
      t.bigint :min_id, null: false
      t.bigint :max_id, null: false
    end

    add_index :created_ids, [:class_name, :hour], unique: true
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
created_id-1.1.0 db/migrate/20230403140000_create_created_ids.rb
created_id-1.0.1 db/migrate/20230403140000_create_created_ids.rb
created_id-1.0.0 db/migrate/20230403140000_create_created_ids.rb