add uuid to accounts

This commit is contained in:
Pete Matsyburka committed 2024-04-05 19:56:34 +03:00
1 parent 33466c1d07
commit 12cf28792b
3 files changed
+33 -1

No files matched your search

+7
View File
@@ -8,10 +8,17 @@
# locale :string not null
# name :string not null
# timezone :string not null
# uuid :string not null
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_accounts_on_uuid (uuid) UNIQUE
#
class Account < ApplicationRecord
attribute :uuid, :string, default: -> { SecureRandom.uuid }
has_many :users, dependent: :destroy
has_many :encrypted_configs, dependent: :destroy
has_many :account_configs, dependent: :destroy