mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
Create tagging system (#792)
* Repro * Fix * Update signage * Create tagging system * Add tags to transaction imports * Build tagging UI * Cleanup * More cleanup
This commit is contained in:
10
db/migrate/20240522133147_create_tags.rb
Normal file
10
db/migrate/20240522133147_create_tags.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateTags < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :tags, id: :uuid do |t|
|
||||
t.string :name
|
||||
t.string "color", default: "#e99537", null: false
|
||||
t.references :family, null: false, foreign_key: true, type: :uuid
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
9
db/migrate/20240522151453_create_taggings.rb
Normal file
9
db/migrate/20240522151453_create_taggings.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class CreateTaggings < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :taggings, id: :uuid do |t|
|
||||
t.references :tag, null: false, foreign_key: true, type: :uuid
|
||||
t.references :taggable, polymorphic: true, type: :uuid
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user