-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
@slonik/migrator is not compatible with slonik 30+ #118
Comments
You have to force it |
@Sairyss what do you think of typeorm? Maybe I can help you switch from slonik to it |
This project was using TypeOrm before slonik. |
@Sairyss Indeed, thank you. |
Not really. If you want raw queries you either use pg, which is very barebones, or Slonik that offers some nice extra features on top. But I'm not a big fan of query builders tbh so I prefer raw queries. Although if your project is not very complex, using an ORM instead is totally fine. You could even use both options and combine power of ORM for types, migrations, easy inserts, simple queries, etc. and use raw queries when you need performance/flexibility. All depends on the project. |
Thanks for the answer |
I also prefer |
First of all, thank you @Sairyss for the immense work you have done in this repo. I started reading the issue related to the one discussed here in the @slonik/migrator repo mmkal/pgkit#417 I have never used slonik, but from what I read there are two aspects that stand out although I really like it and agree that for a large project a raw query approach could be preferable:
Don't you think it would be problematic in a large and complex project, in the long term, relying for the DB layer, on a library managed by a single person and which often introduces major changes based mostly on the opinion of himself ? Would you make the same choice and pick slonik for a new project even today? |
@marcoturi Yeah, breaking changes is definitely an issue. Though slonik is a pretty minimal wrapper, you could create your own or fork it. In one of my projects, way before I found out about slonik, I created my own lib similar to slonik (though somewhat simplified). It took me about a couple of days and still works fine to this day. If I had to choose what to use today, I would probably fork slonik and remove all unnecessary bloat from it, adapt it to my needs, and use that. |
@levonka I'd say that pgkit tools are a good replacement for slonik, at least it’s maintained by a single team and include all the necessary components, like a client and migrator. |
@slonik/migrator is not compatible with slonik 30+, so you cannot create a migration.
To reproduce just delete node_modules folder and try to npm install packages.
The text was updated successfully, but these errors were encountered: