Files
bit/db/migrate/20210613141144_create_links.rb
T
Juan Rodriguez 587f9552c8 feat: Link model
create_links and slug index migrations. generate_slug and shorten model methods

- Create links migration - Add slug index migration
2021-06-13 10:55:05 -05:00

14 lines
257 B
Ruby

# frozen_string_literal: true
class CreateLinks < ActiveRecord::Migration[5.2]
def change
create_table :links do |t|
t.string :slug, null: false
t.text :url
t.integer :click_counter, default: 0
t.timestamps
end
end
end