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

Migrate to MySQL (Plannetscale) #90

Merged
merged 33 commits into from
Feb 4, 2024
Merged

Migrate to MySQL (Plannetscale) #90

merged 33 commits into from
Feb 4, 2024

Conversation

rocktimsaikia
Copy link
Collaborator

No description provided.

everything seems to be working really well.
some sql wizard might be able to speed up my queries but its not the end of the world
@rocktimsaikia
Copy link
Collaborator Author

rocktimsaikia commented Jan 12, 2024

First of all, can you configure your editor to use prettier so that it picks up the my configured prettier settings.

https://github.com/rocktimsaikia/animechan/blob/12de5b18011538890c03126d7308d61c31e9ef15/package.json#L29

@melosh101
Copy link
Collaborator

First of all sorry wasn't aware my editor didn't pick up on the prettier config.
Secondly, sorry for the force push, I screwed up the commit history and a force is necessary to fix it.

@rocktimsaikia
Copy link
Collaborator Author

That's alright. As long as the code is still there :)
I am at office right now. Will come back to this once I get some time.

@rocktimsaikia
Copy link
Collaborator Author

FYI, I'm just cleaning up some things before doing a proper review and testing.

@melosh101
Copy link
Collaborator

That's fine you do your thing, and I'll do mine

@melosh101
Copy link
Collaborator

continuation of e88de0d
i know the drizzle docs show how to do index's with 2 text fields, but when running the migration you get an error saying its not supported. its the reason i didn't add it when i made the first version of the schema

@melosh101
Copy link
Collaborator

continuation of e88de0d
i know the drizzle docs show how to do index's with 2 text fields, but when running the migration you get an error saying its not supported. its the reason i didn't add it when i made the first version of the schema

After a bit of research it would be possible to generate a "unique" index on the names using a generated column that is a md5 hash of the name or preferably of id+name and lookup that instead. I'll do some testing and see how to implement it and how it would affect the query speeds and the liking

server/db/schema.ts Outdated Show resolved Hide resolved
@rocktimsaikia
Copy link
Collaborator Author

Note 🔔
Please don't push any new changes on this PR till notified or merged. I am working on this branch locally and making a lot of changes. Don't want to deal with any sort of merge conflicts at this point.

chore(db): update json data source path
@melosh101
Copy link
Collaborator

Alright I will wait with my own additions till you have pushed yours and I'll deal with conflicts on my end if there are any

@rocktimsaikia rocktimsaikia merged commit 19a2452 into main Feb 4, 2024
@rocktimsaikia
Copy link
Collaborator Author

Good job here @melosh101. There still a lot of areas of improvement in the codebase but I didn't want to make this PR any more complex. Premature optimization is the root of all devils. Anyway Plannetscale is live now 🙌

@melosh101
Copy link
Collaborator

Wohooooooo

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