Skip to content

Commit 2087bff

Browse files
[MHV 66349] created tooltip migration, and added table to database schema (#20938)
* [MHV 66349] created migration, and ran rails db:migrate to add table to database schema. * [MHV 66349] explicitly specify user_accounts table in tooltips migration foreign key.
1 parent 847e6af commit 2087bff

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class CreateTooltips < ActiveRecord::Migration[7.2]
2+
def change
3+
create_table :tooltips, id: :uuid do |t|
4+
t.references :user_account, null: false, foreign_key: { to_table: :user_accounts }, type: :uuid
5+
t.string :tooltip_name, null: false
6+
t.datetime :last_signed_in, null: false
7+
t.integer :counter, default: 0
8+
t.boolean :hidden, default: false
9+
t.timestamps
10+
end
11+
add_index :tooltips, [:user_account_id, :tooltip_name], unique: true
12+
end
13+
end

db/schema.rb

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)