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

change_column_default fails in PostgreSQL adapter for Array columns #11586

Closed
kenips opened this Issue Jul 24, 2013 · 8 comments

Comments

Projects
None yet
3 participants
@kenips

kenips commented Jul 24, 2013

c940b14 has fixed array column type support for change_column. However, change_column_default still fails because in column type is not sent into quote inside change_column. If we allow options to be passed in rather than default then we can fix this, but this changes the abstract adapter interface. Thoughts?

/cc @senny

Potential test case:

Add

  @connection.change_column_default :pg_arrays, :snippets, []

to array_test.rb:31

@kenips

This comment has been minimized.

Show comment
Hide comment
@kenips

kenips Jul 24, 2013

/cc @tenderlove. On second thought I think a better fix would be to finish AlterTable introduced by f20b2f4 and incorporate change_column.

kenips commented Jul 24, 2013

/cc @tenderlove. On second thought I think a better fix would be to finish AlterTable introduced by f20b2f4 and incorporate change_column.

@rafaelfranca

This comment has been minimized.

Show comment
Hide comment
@rafaelfranca

rafaelfranca May 1, 2014

Member

This issue has been automatically marked as stale because it has not been commented on for at least
three months.

The resources of the Rails team are limited, and so we are asking for your help.

If you can still reproduce this error on the 4-1-stable, 4-0-stable branches or on master,
please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions.

Member

rafaelfranca commented May 1, 2014

This issue has been automatically marked as stale because it has not been commented on for at least
three months.

The resources of the Rails team are limited, and so we are asking for your help.

If you can still reproduce this error on the 4-1-stable, 4-0-stable branches or on master,
please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions.

@kenips

This comment has been minimized.

Show comment
Hide comment
@kenips

kenips May 1, 2014

I don't think this has changed. @chancancode you had something in the works?

kenips commented May 1, 2014

I don't think this has changed. @chancancode you had something in the works?

@rafaelfranca rafaelfranca removed the stale label May 1, 2014

@senny

This comment has been minimized.

Show comment
Hide comment
@senny

senny May 2, 2014

Member

I'll add this to my todo list

Member

senny commented May 2, 2014

I'll add this to my todo list

@senny senny self-assigned this May 2, 2014

@senny senny closed this in 096be96 May 12, 2014

senny added a commit that referenced this issue May 12, 2014

pg, `change_column_default` accepts `[]`. Closes #11586.
Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb

senny added a commit that referenced this issue May 12, 2014

pg, `change_column_default` accepts `[]`. Closes #11586.
Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
	activerecord/test/cases/adapters/postgresql/array_test.rb
@senny

This comment has been minimized.

Show comment
Hide comment
@senny

senny May 12, 2014

Member

@kenips fixed and backported to 4-1-stable and 4-0-stable.

Member

senny commented May 12, 2014

@kenips fixed and backported to 4-1-stable and 4-0-stable.

@kenips

This comment has been minimized.

Show comment
Hide comment
@kenips

kenips May 13, 2014

Thanks. Is the goal still moving towards AlterTable?

kenips commented May 13, 2014

Thanks. Is the goal still moving towards AlterTable?

@senny

This comment has been minimized.

Show comment
Hide comment
@senny

senny May 13, 2014

Member

@kenips long term goal is to move to something "like" AlterTable. I tried to refactor to it but there are some open questions. I am currently working on the PG adapter types but will move on to schema creation after that's settled.

Member

senny commented May 13, 2014

@kenips long term goal is to move to something "like" AlterTable. I tried to refactor to it but there are some open questions. I am currently working on the PG adapter types but will move on to schema creation after that's settled.

@kenips

This comment has been minimized.

Show comment
Hide comment
@kenips

kenips May 13, 2014

That's great to hear. Thanks @senny!

kenips commented May 13, 2014

That's great to hear. Thanks @senny!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment