Created
April 17, 2022 15:00
-
-
Save pacarvalho/da8c5f1b5517ebb9abe4f72716f83ee8 to your computer and use it in GitHub Desktop.
Medium Article - Custom Backend Video Model Migration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreateVideo < ActiveRecord::Migration[6.1] | |
def change | |
create_table :videos, id: :uuid do |t| | |
t.string :key, unique: true, index: true | |
t.string :low_res_key, unique: true, index: true | |
t.references :user, foreign_key: true, type: :uuid | |
t.timestamps | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment