-
Notifications
You must be signed in to change notification settings - Fork 0
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
merge(sql_refactor): better sql; #9
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BREAKING CHANGE: permissions serialized as PascalCase.
I added migrations for the `sessions` & `permissions` tables & one to add all permissions to their table & one to create the permission junction table `user_permissions`
mv DangerousUserLogin -> database::users::DangerousLogin.
& changed cookie name to token form session. BREAKING CHANGE: mv login api endpoint to POST token.
I refactore & renamed the DangerousUser struct. The sessions table has been replaced with tokens table in the db. & The tokens table is now being used for token storage BREAKING CHANGE: `user.sessions` column replaced by table `tokens` in db.
IDK I did a lot... meh
5-pebbles
commented
Mar 20, 2024
I need to fix some warnings before merging but I will get to that tomorrow. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes:
Migrations are now run with
refinery
.I changed the format to use
,
at the start of lines, this makes it harder to accidentally leave a trailing,
on the last line.Permissions are now case insensitive & I changed the case used in responses from
camelCase
toPascalCase
.Changed the name of session to token and moved
POST /login
toPOST /token
&DELETE /session
toDELETE /token
.Moved
DangerousUser
toUser
and it no longer stores sensitive information only the permissions and username.I also refactored a bunch of internal stuff, but I am not going to write that down because I am the only one who is ever going to read this -_-
feat(sql): mv migrations to dir run by refinery.
feat(database)!: permissions now case insensitive.
feat(migrations): add migrations of permissions and sessions.
refactor(login): moved api::user::DangerousUserLogin.
refactor(api): mv user_login -> session_write.
feat(tokens)!: mv /login -> /token & /session -> /token.
refactor(tokens)!: DangerousUser -> User & use token table.
feat(sql): junction tables & better sql.
fix(dependencies): rm unused dependency sqlvec.
fix(dependencies): rm unused dependency rusqlite-from-row.