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

Index name needs to be unique #336

Closed
drujensen opened this issue Oct 28, 2017 · 1 comment · Fixed by #340
Closed

Index name needs to be unique #336

drujensen opened this issue Oct 28, 2017 · 1 comment · Fixed by #340

Comments

@drujensen
Copy link
Member

Description

The generator for reference types needs to include the table name os the index name is unique.

Steps to Reproduce

amber new blog --deps
cd blog
amber g auth user
amber g post user:ref title:string body:text
amber g comment user:ref post:ref body:text
amber db create migrate seed

Expected behavior: [What you expect to happen]

Indexes created successfully

Actual behavior: [What actually happens]

$amber db create migrate seed
Created database blog_development
Migrating db, current version: 0, target: 20171028093628
OK   20171028093547_create_user.sql
OK   20171028093608_create_post.sql
An error ocurred executing migration 20171028093628. Error message is: relation "user_id_idx" already exists

Reproduces how often: [What percentage of the time does it reproduce?]

Always

Versions

0.3.0

@marksiemers
Copy link
Contributor

This could be tagged as a good first issue.

eliasjpr pushed a commit that referenced this issue Oct 31, 2017
* Write tests for CREATE INDEX line in migrations template (#336)

* Implement including table name in CREATE INDEX line in migrations template

* Refactor generating CREATE INDEX sql statements for reference fields (#336)

* Refactor generating migrations

* Refactor tests for migration cli templates
elorest pushed a commit that referenced this issue Nov 17, 2017
* Write tests for CREATE INDEX line in migrations template (#336)

* Implement including table name in CREATE INDEX line in migrations template

* Refactor generating CREATE INDEX sql statements for reference fields (#336)

* Refactor generating migrations

* Refactor tests for migration cli templates
elorest pushed a commit that referenced this issue Nov 17, 2017
* Write tests for CREATE INDEX line in migrations template (#336)

* Implement including table name in CREATE INDEX line in migrations template

* Refactor generating CREATE INDEX sql statements for reference fields (#336)

* Refactor generating migrations

* Refactor tests for migration cli templates


Former-commit-id: fc551c5
@faustinoaq faustinoaq added this to Done in Framework 2018 May 5, 2018
@faustinoaq faustinoaq removed this from Done in Framework 2018 Jun 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants