mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 20:15:22 +02: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:
parent
41c991384a
commit
457247da8e
38 changed files with 607 additions and 90 deletions
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
|
Loading…
Add table
Add a link
Reference in a new issue