Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused columns from civicrm_saved_search #16637

Merged
merged 1 commit into from
Feb 27, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Feb 27, 2020

Overview

Remove unused db fields from civicrm_saved_search:

  • where_tables
  • select_tables
  • where_clause

Before

fields exist, unused

After

fields removed

Technical Details

We identified these as unused in 5.20 & removed the places still saving to them -
#14891

This removes the actual columns. A couple of other tables still have similar columns, not sure
if they are required still

Comments

@colemanw

@civibot
Copy link

civibot bot commented Feb 27, 2020

(Standard links)

@civibot civibot bot added the master label Feb 27, 2020
}
if (preg_match('/contribution_type/', $dao->where_clause)) {
$saveDao->where_clause = preg_replace('/contribution_type/', 'financial_type', $dao->where_clause);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At what point did the columns become unused? Were they migrated to something else?

The reason I ask - it seems like this might affect the correctness of a DB upgrade that passes through v4.3?

Maybe that's OK. Maybe we could get away with bumping MINIMUM_UPGRADABLE_VERSION from 4.2 to 4.6?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@totten looking at https://github.com/civicrm/civicrm-svn/search?p=1&q=where_clause&unscoped_q=where_clause It seems as tho it hasn't really been used at all.

@colemanw
Copy link
Member

@eileenmcnaughton can you add a line before the closing brace in FiveTwentyFour.php to make Jenkins happy?

@colemanw
Copy link
Member

Good to know these columns are unused. Makes future refactoring a little simpler.

We identified these as unused in 5.20 & removed the places still saving to them -
civicrm#14891

This removes the actual columns. A couple of other tables still have similar columns, not sure
if they are required still
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants