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

Migrate SharedEntity, LayerNodeStyle and ExternalSource to ActiveRecord #15920

Merged
merged 6 commits into from
Nov 12, 2020

Conversation

amiedes
Copy link
Contributor

@amiedes amiedes commented Nov 5, 2020

Migrates several small models from Sequel to ActiveRecord.

There are several linter warnings about the usage of instance variables within specs, but I'd appreciate if I could leave it like that in order to avoid doing too many spec refactoring.

Acceptance

I've checked in staging:

  • Edit styles of map
  • Import data via regular upload and Dropbox (ExternalDataImport)
  • Share maps via links and with organization users

Base automatically changed from chore/ch109279/migrate-organization-model-to-activerecord to master November 10, 2020 08:00
@amiedes amiedes force-pushed the amiedes/migrate-models-to-activerecord branch 2 times, most recently from 9b32222 to 8da8a93 Compare November 10, 2020 08:52
@amiedes amiedes changed the title Migrate SharedEntity to ActiveRecord Migrate SharedEntity, LayerNodeStyle and ExternalSource to ActiveRecord Nov 10, 2020
@amiedes amiedes force-pushed the amiedes/migrate-models-to-activerecord branch from 8da8a93 to 680a34d Compare November 10, 2020 12:29
@@ -15,7 +15,7 @@ jobs:
shell: bash
run: |
# This script will exit if any of these files is found in the head branch.
ORM_FILES=$(git grep -l 'class.*Sequel::Model' -- app/models)
ORM_FILES=$(git grep -l 'class.*< Sequel::Model\|class DBService' -- app/models)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This prevents some models which include the Sequel::Model string (but don't inherit from it) to be flagged by the ORM check.

Also, considers DBService a "Sequel model", as it relies heavily on ::User

@amiedes amiedes force-pushed the amiedes/migrate-models-to-activerecord branch from 9f87031 to edf9ab9 Compare November 10, 2020 12:47
@amiedes amiedes marked this pull request as ready for review November 10, 2020 14:39
Copy link
Contributor

@thedae thedae left a comment

Choose a reason for hiding this comment

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

LGTM!

@amiedes amiedes merged commit 64144b4 into master Nov 12, 2020
@amiedes amiedes deleted the amiedes/migrate-models-to-activerecord branch November 12, 2020 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants