mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 03:27:52 +00:00
fix migration files
This commit is contained in:
@@ -2,35 +2,24 @@
|
|||||||
#
|
#
|
||||||
# Table name: accounts
|
# Table name: accounts
|
||||||
#
|
#
|
||||||
# id :integer not null, primary key
|
# id :integer not null, primary key
|
||||||
# auto_resolve_duration :integer
|
# auto_resolve_duration :integer
|
||||||
# custom_attributes :jsonb
|
# custom_attributes :jsonb
|
||||||
# domain :string(100)
|
# domain :string(100)
|
||||||
# feature_flags :bigint default(0), not null
|
# feature_flags :bigint default(0), not null
|
||||||
# internal_attributes :jsonb not null
|
# internal_attributes :jsonb not null
|
||||||
# last_credit_sync_at :datetime
|
# limits :jsonb
|
||||||
# limits :jsonb
|
# locale :integer default("en")
|
||||||
# locale :integer default("en")
|
# name :string not null
|
||||||
# monthly_credits :integer default(0), not null
|
# settings :jsonb
|
||||||
# name :string not null
|
# status :integer default("active")
|
||||||
# settings :jsonb
|
# support_email :string(100)
|
||||||
# status :integer default("active")
|
# created_at :datetime not null
|
||||||
# stripe_billing_version :integer default(1), not null
|
# updated_at :datetime not null
|
||||||
# support_email :string(100)
|
|
||||||
# topup_credits :integer default(0), not null
|
|
||||||
# created_at :datetime not null
|
|
||||||
# updated_at :datetime not null
|
|
||||||
# stripe_cadence_id :string
|
|
||||||
# stripe_customer_id :string
|
|
||||||
# stripe_pricing_plan_id :string
|
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
# index_accounts_on_status (status)
|
# index_accounts_on_status (status)
|
||||||
# index_accounts_on_stripe_billing_version (stripe_billing_version)
|
|
||||||
# index_accounts_on_stripe_cadence_id (stripe_cadence_id)
|
|
||||||
# index_accounts_on_stripe_customer_id (stripe_customer_id)
|
|
||||||
# index_accounts_on_stripe_pricing_plan_id (stripe_pricing_plan_id)
|
|
||||||
#
|
#
|
||||||
|
|
||||||
class Account < ApplicationRecord
|
class Account < ApplicationRecord
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
# amount :integer not null
|
# amount :integer not null
|
||||||
# credit_type :string not null
|
# credit_type :string not null
|
||||||
# description :string
|
# description :string
|
||||||
# metadata :json
|
# metadata :jsonb
|
||||||
# transaction_type :string not null
|
# transaction_type :string not null
|
||||||
# created_at :datetime not null
|
# created_at :datetime not null
|
||||||
# updated_at :datetime not null
|
# updated_at :datetime not null
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
class CreateCreditTransactions < ActiveRecord::Migration[7.0]
|
class CreateCreditTransactions < ActiveRecord::Migration[7.0]
|
||||||
def change
|
def change
|
||||||
create_table :credit_transactions do |t|
|
create_table :credit_transactions do |t|
|
||||||
t.references :account, null: false, foreign_key: true
|
t.references :account, null: false
|
||||||
t.string :transaction_type, null: false
|
t.string :transaction_type, null: false
|
||||||
t.integer :amount, null: false
|
t.integer :amount, null: false
|
||||||
t.string :credit_type, null: false
|
t.string :credit_type, null: false
|
||||||
|
|||||||
Reference in New Issue
Block a user