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

Use database_name in share query link #1328

Closed
vera-liu opened this issue Oct 12, 2016 · 6 comments
Closed

Use database_name in share query link #1328

vera-liu opened this issue Oct 12, 2016 · 6 comments
Assignees
Labels
sqllab Namespace | Anything related to the SQL Lab

Comments

@vera-liu
Copy link
Contributor

No description provided.

@vera-liu vera-liu added the sqllab Namespace | Anything related to the SQL Lab label Oct 12, 2016
@vera-liu vera-liu self-assigned this Oct 12, 2016
@vera-liu vera-liu changed the title Use database_name and schema in share query link Use database_name in share query link Oct 12, 2016
@mistercrunch
Copy link
Member

Careful here, there's no guarantee that a database name is unique. It'd be great to have a meaningful/readable yet unique ID for databases.

@bkyryliuk
Copy link
Member

@mistercrunch - can't we just enforce the DB name to be unique?
Do you have any user flow where it would make sense to have multiple DBs with the same name ?

@xrmx
Copy link
Contributor

xrmx commented Oct 20, 2016

@bkyryliuk multiple database with the same name on different datasources does not look that unusual

@mistercrunch
Copy link
Member

I vote for adding a new field database_id that would be unique, non-null and based off of the database_name. No spaces or special character.

That would require a migration script that kickstarts the field and suffix number are added where there is uniqueness conflict on the "slugified" database name.

A utils.slugify(name, model_column) method could be generalized and reused wherever we need this.

@bkyryliuk
Copy link
Member

@vera-liu - could u tackle it this week ?

@vera-liu
Copy link
Contributor Author

vera-liu commented Feb 7, 2017

Since we use shortened link now, this issue is out of scope, closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sqllab Namespace | Anything related to the SQL Lab
Projects
None yet
Development

No branches or pull requests

6 participants