Skip to content

change diesel_manage_updated_at #16

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

Merged
merged 1 commit into from
Mar 16, 2022
Merged

Conversation

sansx
Copy link
Contributor

@sansx sansx commented Mar 14, 2022

In our TODO.md:
Change diesel_manage_updated_at to manage_updated_at.
Am I doing this right? 🤔

@Wulf
Copy link
Owner

Wulf commented Mar 14, 2022

@sansx! I hope everything is well my brother! Yeah that was exactly what I meant 😄

There's just a few other changes we have to make in create-rust-app_cli:

  • the auth plugin's migration should be updated (see src/plugins/auth.rs)
  • as well as the migration for the todo example in the template (see template/migrations/todos/up.sql)

Apart from that, it looks good. The idea behind this change is to make way for adding something like sqlx in the future.

I've actually tried adding sqlx as an option, but unfortunately, I found that there was a lack of support for some advanced queries. I think current users of the sqlx have found workarounds, but I stopped my implementation midway. I've had a similar experience as @pythoneer (launchbadge/sqlx#1014) when using sqlx.

@sansx
Copy link
Contributor Author

sansx commented Mar 14, 2022

Hey, brother! I had some time to take a break recently, so I want to use this pr as a warm-up to continue contributing to our project. 😆
I had checked the rust code and created an instance locally, it seems nice to me. no error.
Is this require me to change about sql stuff? I'm not very familiar with it.
I want to finish it, but don't know where should I start.

@Wulf
Copy link
Owner

Wulf commented Mar 15, 2022

lol sorry I think I made it seem more complicated then it is -- now we just need to replace all instances of diesel_manage_updated_at to manage_updated_at -- there are a few left, that's all :)

You can find them in these two files:

  • src/plugins/auth.rs
  • template/migrations/xxxxxxxxxx_todos/up.sql

Copy link
Owner

@Wulf Wulf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my bad @sansx I'm losing my mind, ignore everything I wrote above -- this is all good to go

@sansx sansx merged commit 671ef4d into Wulf:main Mar 16, 2022
@sansx sansx deleted the change_diesel_sql branch March 16, 2022 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants