Sha256: 6565cdea1a3c98d637c418d6c6a3eeb79681ac95ae8d3dcd83b0aa61c7c78f79

Contents?: true

Size: 483 Bytes

Versions: 6

Compression:

Stored size: 483 Bytes

Contents

# frozen_string_literal: true

class CreateRailsUrlShortenerUrls < ActiveRecord::Migration[7.0]
  def change
    create_table :tanshuku_urls do |t|
      t.text :url, null: false
      t.string :hashed_url, null: false, limit: 128, index: { unique: true }, comment: "cf. Tanshuku::Url.hash_url"
      t.string :key, null: false, limit: 20, index: { unique: true }, comment: "cf. Tanshuku::Url.generate_key"
      t.datetime :created_at, null: false, precision: nil
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tanshuku-0.0.6 db/migrate/20230220123456_create_tanshuku_urls.rb
tanshuku-0.0.5 db/migrate/20230220123456_create_tanshuku_urls.rb
tanshuku-0.0.4 db/migrate/20230220123456_create_tanshuku_urls.rb
tanshuku-0.0.3 db/migrate/20230220123456_create_tanshuku_urls.rb
tanshuku-0.0.2 db/migrate/20230220123456_create_tanshuku_urls.rb
tanshuku-0.0.1 db/migrate/20230220123456_create_tanshuku_urls.rb