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

Handle columns from activerecord-postgis-adapter #694

Merged
merged 1 commit into from
Dec 18, 2019
Merged

Handle columns from activerecord-postgis-adapter #694

merged 1 commit into from
Dec 18, 2019

Conversation

inkstak
Copy link
Contributor

@inkstak inkstak commented Nov 22, 2019

Same problem returned by @janosrusiczki in #430

Spatial columns with activerecord-postgis-adapter (5.2.2) are not displayed nice

# name           :string(3)
# active         :boolean          default(FALSE), not null
# geom           :geometry({:srid= geometry, 4326

That's come from activerecord-postgis-adapter, with redefined columns as such :

#<ActiveRecord::ConnectionAdapters::PostGIS::SpatialColumn 
  @sql_type="geometry(Geometry,4326)",
  @geo_type="Geometry",
  @geometric_type=RGeo::Feature::Geometry,
  @srid=4326,
  @limit={:srid=>4326, :type=>"geometry"}
  [...]
>

This fix displays them like this :

# name           :string(3)
# active         :boolean          default(FALSE), not null
# geometry       :geometry         geometry, 4326

Another possibility would have been to display them as below, but it involves a lot of extra-spaces for other columns.

# name           :string(3)
# active         :boolean                   default(FALSE), not null
# geometry       :geometry(Geometry, 4326)

@janosrusiczki
Copy link

janosrusiczki commented Nov 22, 2019

@inkstak good stuff, but why did you cancel the CI process?

@inkstak
Copy link
Contributor Author

inkstak commented Nov 22, 2019

I did ? I have no idea how !

EDIT: fixed

Copy link

@janosrusiczki janosrusiczki left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@drwl
Copy link
Collaborator

drwl commented Dec 17, 2019

@janosrusiczki just checking were you able to review this and get this to work?

@inkstak can you rebase?

@drwl drwl added the reviewed label Dec 17, 2019
@inkstak
Copy link
Contributor Author

inkstak commented Dec 17, 2019

@drwl What do you need to rebase ?

@inkstak
Copy link
Contributor Author

inkstak commented Dec 17, 2019

@drwl Got it ;)

Do you need me to fix Hound reviews ? I mostly followed the existing specs.

@janosrusiczki
Copy link

janosrusiczki commented Dec 17, 2019 via email

@inkstak
Copy link
Contributor Author

inkstak commented Dec 17, 2019

Hound issues fixed.

@drwl drwl merged commit c13fe49 into ctran:develop Dec 18, 2019
@drwl
Copy link
Collaborator

drwl commented Dec 18, 2019

Cool thanks for the PR @inkstak and for reviewing it @janosrusiczki. Hoping to cut another release soon.

peterfication pushed a commit to store2be/annotate_models that referenced this pull request Jan 20, 2020
…an#694)

Same problem returned by @janosrusiczki in ctran#430

Spatial columns with activerecord-postgis-adapter (5.2.2) are not displayed nice

```
# name           :string(3)
# active         :boolean          default(FALSE), not null
# geom           :geometry({:srid= geometry, 4326
```

That's come from activerecord-postgis-adapter, with redefined columns as such :

``` 
#<ActiveRecord::ConnectionAdapters::PostGIS::SpatialColumn 
  @sql_type="geometry(Geometry,4326)",
  @geo_type="Geometry",
  @geometric_type=RGeo::Feature::Geometry,
  @srid=4326,
  @limit={:srid=>4326, :type=>"geometry"}
  [...]
>
```

This fix displays them like this :

```
# name           :string(3)
# active         :boolean          default(FALSE), not null
# geometry       :geometry         geometry, 4326
```

Another possibility would have been to display them as below, but it involves a lot of extra-spaces for other columns.

```
# name           :string(3)
# active         :boolean                   default(FALSE), not null
# geometry       :geometry(Geometry, 4326)
```
vfonic pushed a commit to vfonic/annotate_models that referenced this pull request May 8, 2020
…an#694)

Same problem returned by @janosrusiczki in ctran#430

Spatial columns with activerecord-postgis-adapter (5.2.2) are not displayed nice

```
# name           :string(3)
# active         :boolean          default(FALSE), not null
# geom           :geometry({:srid= geometry, 4326
```

That's come from activerecord-postgis-adapter, with redefined columns as such :

``` 
#<ActiveRecord::ConnectionAdapters::PostGIS::SpatialColumn 
  @sql_type="geometry(Geometry,4326)",
  @geo_type="Geometry",
  @geometric_type=RGeo::Feature::Geometry,
  @srid=4326,
  @limit={:srid=>4326, :type=>"geometry"}
  [...]
>
```

This fix displays them like this :

```
# name           :string(3)
# active         :boolean          default(FALSE), not null
# geometry       :geometry         geometry, 4326
```

Another possibility would have been to display them as below, but it involves a lot of extra-spaces for other columns.

```
# name           :string(3)
# active         :boolean                   default(FALSE), not null
# geometry       :geometry(Geometry, 4326)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants