cesium-ml / baselayer

Fully customizable (scientific, compute-intensive) web application template
http://cesium-ml.org/baselayer/
30 stars 18 forks source link

Add (user_id, name) Token unique constraint #262

Closed acrellin closed 2 years ago

acrellin commented 2 years ago

This patch removes the table-wide unique constraint on Token.name, and instead adds a new (user_id, token_name) unique constraint so that different users can have tokens of the same name.

This will require a migration when upgrading SkyPortal.

Closes https://github.com/skyportal/skyportal/issues/2195

pep8speaks commented 2 years ago

Hello @acrellin! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 1388:80: E501 line too long (112 > 79 characters)

acrellin commented 2 years ago

@stefanv Thoughts on this?

acrellin commented 2 years ago

@stefanv This is a small one; mind taking a look when you have a moment? Thanks!