Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

Merge branch 'main' into add-config-import-csv-skip-first-x-rows

Juan José Mata664a00678ee0
diff --cc app/models/import.rb
index 6a5855ca01,05b4265733..fb8c72686f
--- a/app/models/import.rb
+++ b/app/models/import.rb
@@@ -36,7 -39,7 +39,8 @@@ class Import < ApplicationRecor
validates :col_sep, inclusion: { in: SEPARATORS.map(&:last) }
validates :signage_convention, inclusion: { in: SIGNAGE_CONVENTIONS }, allow_nil: true
validates :number_format, presence: true, inclusion: { in: NUMBER_FORMATS.keys }
+ validates :rows_to_skip, numericality: { greater_than_or_equal_to: 0 }
+ validate :account_belongs_to_family
has_many :rows, dependent: :destroy
has_many :mappings, dependent: :destroy
diff --cc db/schema.rb
index 8f1bbc8b9d,6465a2c169..db2b27089b
--- a/db/schema.rb
+++ b/db/schema.rb
@@@ -10,7 -10,7 +10,7 @@@
#
# It's strongly recommended that you check this file into your version control system.
- ActiveRecord::Schema[7.2].define(version: 2025_12_26_205942) do
-ActiveRecord::Schema[7.2].define(version: 2026_01_10_122603) do
++ActiveRecord::Schema[7.2].define(version: 2026_01_10_142603) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
enable_extension "plpgsql"
@@@ -538,7 -588,7 +588,8 @@@
t.string "exchange_operating_mic_col_label"
t.string "amount_type_strategy", default: "signed_amount"
t.string "amount_type_inflow_value"
+ t.integer "rows_to_skip", default: 0, null: false
+ t.integer "rows_count", default: 0, null: false
t.index ["family_id"], name: "index_imports_on_family_id"
end