4 ms·
Does it have migrations yet? I'd like to give Prisma a try, but if there's no sane way to change my schema (part of my daily backend workflow) then it's less i
by davedx 6y ago
Does it have migrations yet?
I'd like to give Prisma a try, but if there's no sane way to change my schema (part of my daily backend workflow) then it's less interesting, no matter how nice the API is. For now I'll stick with Sequelize.
- gabrielizaias 6y agoThey have, but it's "experimental" at the moment: https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-migrate https://www.prisma.io/docs/reference/tools-and-interfaces/pr...
- nikolasburk 6y agoToday's release unfortunately doesn't include our migration solution Prisma Migrate [1] yet. We totally understand that a lot of people want to get "database access" and "schema migrations" with the same tool/library, that's why we're focusing most of our engineering efforts on Prisma Migrate next and will hopefully be able to release that soon! However, we do see a lot of folks using third-party migrations (like knex.js or indeed Sequelize) and then still get the benefits of Prisma Client [2] through introspection [3] for the time being. For non-critical applications we also already see lots of users who are trying out Migrate and help us improve it through constant feedback! I'd love to hear your thoughts on the current version so that we can make sure to consider your feedback and ideas for Migrate when building it out over the next few months. [1] https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-migrate https://www.prisma.io/docs/reference/tools-and-interfaces/pr... [2] https://www.prisma.io/blog/announcing-prisma-2-n0v98rzc8br1/#how-prisma-client-boosts-productivity-and-raises-confidence https://www.prisma.io/blog/announcing-prisma-2-n0v98rzc8br1/... [3] https://www.prisma.io/docs/reference/tools-and-interfaces/introspection https://www.prisma.io/docs/reference/tools-and-interfaces/in...
- andrewingram 6y agoIs there a plan for a higher-level migration API rather than just generating + executing raw sql strings?
- albertoperdomo 6y agoI’m with the Product team at Prisma. Prisma Migrate (experimental) generates migrations from changes to the Prisma schema. These migrations use an internal DSL that ends up translating to SQL commands for relational DBs. Can you please elaborate a bit more on what you’d expect as a higher-level migration API?
- dirkc 6y agoI'm very glad to see work being done on db bindings, but until migrations reach the level of django/active record, I won't be using postgres + node.js seriously (again).
- albertgao 6y agono worries, it's their goal :)
- albertoperdomo 6y agoI'm with the product team at Prisma. Prisma Migrate is different from ActiveRecord migrations (which are very familiar with) because the DB schema is state-based. The Prisma schema file acts as source of truth and the DB schema will be migrated to match it. Can you elaborate on what you would perceive as reaching the level of Django/ActiveRecord? I'd be interesting in specific aspects/items.
- dirkc 6y agoThat sounds great! I'm not super familiar with ActiveRecord, but I use Django migrations regularly. For me the things that stand out are 1. a declarative model - ie. defining the db schema rather than the migrations 2. auto generated migrations with the ability to customize 3. integration with tools for deployment and testing You probably have a much better idea of the landscape, but reach out to Andrew Godwin [1], he wrote south and then rewrote it to become django migrations. [1] - https://www.aeracode.org/ https://www.aeracode.org/
- nsonha 6y agoMany people don't care for their schema language anyway so they won't miss writing migrations in it. Just do migration like normally with SQL.