From 2ac5e28b8e50d2eaa3250530d9ae08068bd59485 Mon Sep 17 00:00:00 2001 From: "deepsource-totalanarchy[bot]" <107136100+deepsource-totalanarchy[bot]@users.noreply.github.com> Date: Mon, 19 Jun 2023 05:18:22 +0000 Subject: [PATCH 1/2] ci: Update .deepsource.toml --- .deepsource.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.deepsource.toml b/.deepsource.toml index ee99b3b..73f6615 100644 --- a/.deepsource.toml +++ b/.deepsource.toml @@ -2,3 +2,6 @@ version = 1 [[analyzers]] name = "ruby" + +[[analyzers]] +name = "shell" \ No newline at end of file From 5444f57e76f9f1e04bf184b44d07dc95a0847682 Mon Sep 17 00:00:00 2001 From: Syed Faraaz Ahmad Date: Wed, 12 Jul 2023 12:23:43 +0530 Subject: [PATCH 2/2] fix: all fields to symbols --- lib/trains/visitor/migration.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/trains/visitor/migration.rb b/lib/trains/visitor/migration.rb index 9c05ba5..d333ef5 100644 --- a/lib/trains/visitor/migration.rb +++ b/lib/trains/visitor/migration.rb @@ -99,7 +99,7 @@ def parse_one_liner_migration(node) DTO::Migration.new( table_name, node.method_name, - [DTO::Field.new(column_name, type)], + [DTO::Field.new(column_name.to_sym, type)], @migration_version ) end @@ -176,18 +176,18 @@ def parse_migration_field(node) # t.column col_name, col_type type = node.children[3].value value = node.children[2].value - fields << DTO::Field.new(value, type) + fields << DTO::Field.new(value.to_sym, type) when :references, :belongs_to # t.references type = :bigint value = "#{node.children[2].value}_id".to_sym - fields << DTO::Field.new(value, type) + fields << DTO::Field.new(value.to_sym, type) when :index else # t.string, t.integer etc. type = node.children[1] value = parse_args(node.children[2]) - fields << DTO::Field.new(value, type) + fields << DTO::Field.new(value.to_sym, type) end fields