mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 11:08:04 +00:00 
			
		
		
		
	fix migration files
This commit is contained in:
		| @@ -8,29 +8,18 @@ | |||||||
| #  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") | ||||||
| #  monthly_credits        :integer          default(0), not null |  | ||||||
| #  name                  :string           not null | #  name                  :string           not null | ||||||
| #  settings              :jsonb | #  settings              :jsonb | ||||||
| #  status                :integer          default("active") | #  status                :integer          default("active") | ||||||
| #  stripe_billing_version :integer          default(1), not null |  | ||||||
| #  support_email         :string(100) | #  support_email         :string(100) | ||||||
| #  topup_credits          :integer          default(0), not null |  | ||||||
| #  created_at            :datetime         not null | #  created_at            :datetime         not null | ||||||
| #  updated_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
	 Tanmay Sharma
					Tanmay Sharma