From 725bb449d5cf84218713a1f89f110425115026b8 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Mon, 23 Dec 2019 09:20:36 +0100 Subject: [PATCH] Fix naming --- app/services/repository_datatable_service.rb | 2 +- ...column.rb => 20191205133522_create_repository_checklists.rb} | 2 +- db/structure.sql | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) rename db/migrate/{20191205133522_create_repository_checklist_column.rb => 20191205133522_create_repository_checklists.rb} (94%) diff --git a/app/services/repository_datatable_service.rb b/app/services/repository_datatable_service.rb index 101b6e064..8777f2d1f 100644 --- a/app/services/repository_datatable_service.rb +++ b/app/services/repository_datatable_service.rb @@ -129,7 +129,7 @@ class RepositoryDatatableService cells = RepositoryCell.joins(sorting_data_type::SORTABLE_VALUE_INCLUDE) .where('repository_cells.repository_column_id': sorting_column.id) .select("repository_cells.repository_row_id, - string_agg( + STRING_AGG( #{sorting_data_type::SORTABLE_COLUMN_NAME}, ' ' ORDER BY #{sorting_data_type::SORTABLE_COLUMN_NAME}) AS value") .group('repository_cells.repository_row_id') diff --git a/db/migrate/20191205133522_create_repository_checklist_column.rb b/db/migrate/20191205133522_create_repository_checklists.rb similarity index 94% rename from db/migrate/20191205133522_create_repository_checklist_column.rb rename to db/migrate/20191205133522_create_repository_checklists.rb index eae92fb0c..c62951065 100644 --- a/db/migrate/20191205133522_create_repository_checklist_column.rb +++ b/db/migrate/20191205133522_create_repository_checklists.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class CreateRepositoryChecklistColumn < ActiveRecord::Migration[6.0] +class CreateRepositoryChecklists < ActiveRecord::Migration[6.0] def change create_table :repository_checklist_values do |t| t.references :created_by, index: true, foreign_key: { to_table: :users }, null: true diff --git a/db/structure.sql b/db/structure.sql index 68159d3af..ceb5580c9 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -7196,3 +7196,4 @@ INSERT INTO "schema_migrations" (version) VALUES ('20191210103004'), ('20191218072619'); +