mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 02:57:57 +00:00 
			
		
		
		
	fix migration files
This commit is contained in:
		| @@ -2,35 +2,24 @@ | ||||
| # | ||||
| # Table name: accounts | ||||
| # | ||||
| #  id                     :integer          not null, primary key | ||||
| #  auto_resolve_duration  :integer | ||||
| #  custom_attributes      :jsonb | ||||
| #  domain                 :string(100) | ||||
| #  feature_flags          :bigint           default(0), not null | ||||
| #  internal_attributes    :jsonb            not null | ||||
| #  last_credit_sync_at    :datetime | ||||
| #  limits                 :jsonb | ||||
| #  locale                 :integer          default("en") | ||||
| #  monthly_credits        :integer          default(0), not null | ||||
| #  name                   :string           not null | ||||
| #  settings               :jsonb | ||||
| #  status                 :integer          default("active") | ||||
| #  stripe_billing_version :integer          default(1), 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 | ||||
| #  id                    :integer          not null, primary key | ||||
| #  auto_resolve_duration :integer | ||||
| #  custom_attributes     :jsonb | ||||
| #  domain                :string(100) | ||||
| #  feature_flags         :bigint           default(0), not null | ||||
| #  internal_attributes   :jsonb            not null | ||||
| #  limits                :jsonb | ||||
| #  locale                :integer          default("en") | ||||
| #  name                  :string           not null | ||||
| #  settings              :jsonb | ||||
| #  status                :integer          default("active") | ||||
| #  support_email         :string(100) | ||||
| #  created_at            :datetime         not null | ||||
| #  updated_at            :datetime         not null | ||||
| # | ||||
| # Indexes | ||||
| # | ||||
| #  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) | ||||
| #  index_accounts_on_status  (status) | ||||
| # | ||||
|  | ||||
| class Account < ApplicationRecord | ||||
|   | ||||
| @@ -6,7 +6,7 @@ | ||||
| #  amount           :integer          not null | ||||
| #  credit_type      :string           not null | ||||
| #  description      :string | ||||
| #  metadata         :json | ||||
| #  metadata         :jsonb | ||||
| #  transaction_type :string           not null | ||||
| #  created_at       :datetime         not null | ||||
| #  updated_at       :datetime         not null | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| class CreateCreditTransactions < ActiveRecord::Migration[7.0] | ||||
|   def change | ||||
|     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.integer :amount, null: false | ||||
|       t.string :credit_type, null: false | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Tanmay Sharma
					Tanmay Sharma