TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Migrating from Supabase

382 点作者 stevekrouse将近 2 年前

35 条评论

kiwicopple将近 2 年前
hey hn, supabase ceo here<p>the Val Town team were kind enough to share this article with me before they released it. Perhaps you know from previous HN threads that we take customer feedback very seriously. Hearing feedback like this is hard. Clearly the team at Val Town wanted Supabase to be great and we didn’t meet their expectations. For me personally, that hurts. A few quick comments<p>1. Modifying the database in production: I’ve published a doc on Maturity Models[0]. Hopefully this makes it clear that developers should be using Migrations once their project is live (not using the Dashboard to modify their database live). It also highlights the options for managing dev&#x2F;local environments. This is just a start. We’re building Preview Databases into the native workflow so that developers don’t need to think about this.<p>2. Designing for Supabase: Our goal is to make all of Postgres easy, not obligatory. I’ve added a paragraph[1] in the first page in our Docs highlighting that it’s not always a good idea to go all-in on Postgres. We’ll add examples to our docs with “traditional” approaches like Node + Supabase, Rails + Supabase, etc. There are a lot of companies using this approach already, but our docs are overly focused on “the Supabase way” of doing things. There shouldn’t be a reason to switch from Supabase to any other Postgres provider if you want “plain Postgres”.<p>3. That said, we also want to continue making “all of Postgres” easy to use. We’re committed to building an amazing CLI experience. Like any tech, we’re going to need a few iterations. W’re building tooling for debugging and observability. We have index advisors coming[2]. We recently added Open Telemetry to Logflare[3] and added logging for local development[4]. We’re making platform usage incredibly clear[5]. We aim to make your database indestructible - we care about resilience as much as experience and we’ll make sure we highlight that in future product announcements.<p>I’ll finish with something that I think we did well: migrating away from Supabase was easy for Val Town, because it’s just Postgres. This is one of our core principles, “everything is portable” (<a href="https:&#x2F;&#x2F;supabase.com&#x2F;docs&#x2F;guides&#x2F;getting-started&#x2F;architecture#everything-is-portable">https:&#x2F;&#x2F;supabase.com&#x2F;docs&#x2F;guides&#x2F;getting-started&#x2F;architectur...</a>). Portability forces us compete on experience. We aim to be the best Postgres hosting service in the world, and we’ll continue to focus on that goal even if we’re not there yet.<p>[0] Maturity models: <a href="https:&#x2F;&#x2F;supabase.com&#x2F;docs&#x2F;guides&#x2F;platform&#x2F;maturity-model">https:&#x2F;&#x2F;supabase.com&#x2F;docs&#x2F;guides&#x2F;platform&#x2F;maturity-model</a><p>[1] Choose your comfort level: <a href="https:&#x2F;&#x2F;supabase.com&#x2F;docs&#x2F;guides&#x2F;getting-started&#x2F;architecture#choose-your-comfort-level">https:&#x2F;&#x2F;supabase.com&#x2F;docs&#x2F;guides&#x2F;getting-started&#x2F;architectur...</a><p>[2] Index advisor: <a href="https:&#x2F;&#x2F;database.dev&#x2F;olirice&#x2F;index_advisor" rel="nofollow">https:&#x2F;&#x2F;database.dev&#x2F;olirice&#x2F;index_advisor</a><p>[3] Open Telemetry: <a href="https:&#x2F;&#x2F;github.com&#x2F;Logflare&#x2F;logflare&#x2F;pull&#x2F;1466">https:&#x2F;&#x2F;github.com&#x2F;Logflare&#x2F;logflare&#x2F;pull&#x2F;1466</a><p>[4] Local logging: <a href="https:&#x2F;&#x2F;supabase.com&#x2F;blog&#x2F;supabase-logs-self-hosted">https:&#x2F;&#x2F;supabase.com&#x2F;blog&#x2F;supabase-logs-self-hosted</a><p>[5] Usage: <a href="https:&#x2F;&#x2F;twitter.com&#x2F;kiwicopple&#x2F;status&#x2F;1658683758718124032?s=20" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;kiwicopple&#x2F;status&#x2F;1658683758718124032?s=...</a>
评论 #36007922 未加载
评论 #36006387 未加载
评论 #36006207 未加载
评论 #36006688 未加载
评论 #36008290 未加载
评论 #36028993 未加载
评论 #36008440 未加载
评论 #36012050 未加载
评论 #36010436 未加载
评论 #36011944 未加载
评论 #36035449 未加载
评论 #36006854 未加载
ilrwbwrkhv将近 2 年前
I also had the same experience with Supabase.<p>Even though it looks like a great product initially, it has a lot or errors and bugs when you are trying to actually build something more robust than a toy app.<p>Local development is a massive pain with random bugs.<p>The response time of the database also varies all over the place.<p>But the most important problem that we faced, was having so much of application logic in the database.<p>Row level security is their &quot;foundational piece&quot;, but there is a reason why we moved away from database functions and application logic in database over a decade ago: that stuff in unmaintainable.<p>There is also really poor support and at the end of the day, the whole platform felt like a hack.<p>I think now, for most apps with up to 500_000 users (with 10_000 concurrent realtime connections) PocketBase is the best PaaS out there having tested a bunch of them.<p>A single deployable binary which PocketBase provides is a breath of fresh air.<p>Anything more than that, just directly being on top of bare metal or AWS &#x2F; GCP is much better.
评论 #36007487 未加载
评论 #36006081 未加载
评论 #36007146 未加载
评论 #36006536 未加载
评论 #36007703 未加载
dbmikus将近 2 年前
Personally, I had a really easy time getting Supabase to work locally. However, we use `dbmate` to manage our migrations instead of built-in Supabase migrations.<p>Also curious to hear from others on this:<p>&gt; After a bit of sleuthing, it ended up that Supabase was taking a database backup that took the database fully offline every night, at midnight.<p>This seems like a terrible design decision if true. Why not just backup via physical or logical replication?<p>And totally hear the issues here with database resizing and vacuuming and other operations. That stuff is a big pain when it breaks.
评论 #36006017 未加载
Ethan_Mick将近 2 年前
How do people on HN like Row Level Security? Is it a better way to handle multi-tenant in a cloud SaaS app vs `WHERE` clauses in SQL? Worse? Nicer in theory but less maintainable in practice?<p>fwiw, Prisma has a guide on how to do RLS with it&#x27;s client. While the original issue[0] remains open they have example code[1] with the client using client extensions[2]. I was going to try it out and see how it felt.<p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;prisma&#x2F;prisma&#x2F;issues&#x2F;12735">https:&#x2F;&#x2F;github.com&#x2F;prisma&#x2F;prisma&#x2F;issues&#x2F;12735</a><p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;prisma&#x2F;prisma-client-extensions&#x2F;blob&#x2F;main&#x2F;row-level-security&#x2F;script.ts">https:&#x2F;&#x2F;github.com&#x2F;prisma&#x2F;prisma-client-extensions&#x2F;blob&#x2F;main...</a><p>[2]: <a href="https:&#x2F;&#x2F;www.prisma.io&#x2F;docs&#x2F;concepts&#x2F;components&#x2F;prisma-client&#x2F;client-extensions#example-use-cases-for-extended-clients" rel="nofollow">https:&#x2F;&#x2F;www.prisma.io&#x2F;docs&#x2F;concepts&#x2F;components&#x2F;prisma-client...</a>
评论 #36007445 未加载
评论 #36013027 未加载
评论 #36007032 未加载
评论 #36007051 未加载
评论 #36006949 未加载
评论 #36007551 未加载
simonw将近 2 年前
The documentation section here applies to so many products I&#x27;ve battled in the past.<p>&gt; The command supabase db remote commit is documented as &quot;Commit Remote Changes As A New Migration&quot;. The command supabase functions new is documented as &quot;Create A New Function Locally.&quot; The documentation page is beautiful, but the words in it just aren&#x27;t finished.<p>Great documentation is such a force multiplier for a product. It&#x27;s so worthwhile investing in this.<p>Don&#x27;t make your most dedicated users (the ones who get as far as consulting your documentation) guess how to use your thing!
评论 #36006282 未加载
t1mmen将近 2 年前
I hadn’t touched SQL for almost 7 years, but dipped my toes back in to build a PoC using Supabase. Despite some initial pains around RLS, I’ve grown to love it.<p>Sure, Supabase has some awkward quirks and issue, and author has some good points. But when it works like it should, it’s pretty awesome. I think of it as a powerful wrapper around solid services that make for great DX, in _most_ cases.<p>If Supabase could provide a great way to handle migrations and RLS, that’d be the biggest improvement to most people’s workflows, I’d bet.<p>I really wish I could just define my scheme, tables, functions, triggers, policies etc as typescript, then have migrations generated from that.
评论 #36010987 未加载
joshghent将近 2 年前
Echo all the words from the author here, and kudos for being transparent.<p>I’ve faced exactly the same problems building my new product. But, on the other hand, Supabase was incredibly easy to setup, and meant I could worry about infrastructure later.<p>Pros and cons like with everything, and always wise to understand the flaws of the tech you’re using.
omeze将近 2 年前
The local development &amp; database migration story is Supabase&#x27;s biggest weakness. I hate having to do migrations live in prod. The admin dashboard is just so much better than any alternative Postgres tooling that it&#x27;s been worth using despite that. Takes care of the stuff I&#x27;d normally be sweating over when writing migrations like nullable fields &#x2F; FK constraints &#x2F; JSON formatting for default fields. Would be great if Supabase allowed for a &quot;speculative migration&quot; in its UX where it spit out a file you could use locally to test beforehand.
评论 #36006602 未加载
评论 #36006174 未加载
ahachete将近 2 年前
A mid way could be self-hosting Supabase, whether you use more or less Supabase features.<p>I know self-hosting might be challenging, specially getting a production-ready Postgres backend for it.<p>That&#x27;s why at StackGres we have built a Runbook [1] and companion blog post [2] to help you run Supabase on Kubernetes. All required components are fully open source, so you are more than welcome to try it and give feedback if you are looking into this alternative.<p>[1]: <a href="https:&#x2F;&#x2F;stackgres.io&#x2F;doc&#x2F;latest&#x2F;runbooks&#x2F;supabase-stackgres&#x2F;" rel="nofollow">https:&#x2F;&#x2F;stackgres.io&#x2F;doc&#x2F;latest&#x2F;runbooks&#x2F;supabase-stackgres&#x2F;</a><p>[2]: <a href="https:&#x2F;&#x2F;stackgres.io&#x2F;blog&#x2F;running-supabase-on-top-of-stackgres&#x2F;" rel="nofollow">https:&#x2F;&#x2F;stackgres.io&#x2F;blog&#x2F;running-supabase-on-top-of-stackgr...</a><p>update: edit
jackconsidine将近 2 年前
Nice read. I run 5-6 projects on Supabase currently. I have also run into the local development &#x2F; migration obstacles. It&#x27;s otherwise been pretty great for our needs
评论 #36008167 未加载
PKop将近 2 年前
Interesting statement here:<p>&quot;We rewrote our data layer to treat the database as a simple persistence layer rather than an application. We eliminated all the triggers, stored procedures, and row-level security rules. That logic lives in the application now.&quot;<p>Reminds me of the article and discussion here[0] over whether to put logic in the database or not and to what degree.<p>[0] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=35643432" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=35643432</a> &quot;Use Databases Without Putting Domain Logic in Them&quot;
评论 #36007183 未加载
motoxpro将近 2 年前
Great read. Similar to my experience with Hasura. Migrations we’re better there but the row level security was a nightmare. Went to just a custom node backend with prisma and it’s a dream. No more writing tons of json rules and multiple views just to not query the email field.<p>Seems like these types of services are good for basic large scale crud applications, probably why you have Hasura pivoting to enterprise.<p>The quote at the end of going back the future is exactly how I felt. Will never use a Hasura&#x2F;Supabase&#x2F;etc again. Just makes things more difficult.
评论 #36006730 未加载
lastangryman将近 2 年前
Having worked on a Baas type offering, this is all very familiar. Over the years, I&#x27;ve come to believe the approach of trying define a service layer with these magic abstractions is fundamentally flawed and will always lead to the problems in this article: poor performance, poor local development experience, no transparency in to what is going on under the hood. They are great for fast proof of concepts, but not sustainable, long term product development.
xwowsersx将近 2 年前
&gt; we just wanted a database. ...<p>&gt; Render Preview Environments are amazing: they spin up an entire clone of our whole stack — frontend remix server, node api server, deno evaluation server, and now postgres database — for every pull request.<p>So they wanted more than a database then, no? Are they saying they really just needed a DB and the other stuff was a nice bonus? If they really wanted just a DB, are there not cheaper, and possibly simpler, options than Render?
评论 #36012907 未加载
评论 #36011036 未加载
tonerow将近 2 年前
Supabase is also great for auth. Did you reimplement auth yourself or switch to another auth service or framework?
评论 #36006408 未加载
评论 #36006375 未加载
atsjie将近 2 年前
Wait, so unknown hyped tech X didn&#x27;t work out and you went back to stuff that has been around for 30 years?<p>I&#x27;m shocked.
jononomo将近 2 年前
I have just begun playing with Supabase and have a habit of running `brew upgrade` several times per week. It bugs me that the Supabase CLI is updated every single time I run `brew upgrade`. I suspect that if I were to run `brew upgrade` twice a day, it would probably still update every single time. It makes me feel like I&#x27;m trying to swing a bat around, except it&#x27;s made of water.
exac将近 2 年前
&gt; Local development was tough<p>&gt; Unfortunately, we just couldn’t get it to work<p>Every time I read one of these migration stories, I find myself waiting with baited breath for the part the team couldn&#x27;t achieve. After finding it, the remainder of the story becomes difficult to read.<p>It isn&#x27;t necessarily the team&#x27;s fault, the developer experience clearly has room for improvement. Props to Val Town for being so honest, it is difficult to do.
评论 #36005713 未加载
jononomo将近 2 年前
I&#x27;m currently contracted on a greenfield Django REST framework app and if the decision had been up to me I probably would have gone with Supabase right off the bat. But honestly I&#x27;m absolutely loving Django REST framework over vanilla Postgres. It took me a while to get the hang of views and serializers and validation, etc, but now that I do it feels incredibly flexible and powerful. One thing I&#x27;m loving is how easy it has been for me to write management commands and build a comprehensive test suite, and that&#x27;s one aspect of building a web app that I don&#x27;t hear talked about much with Supabase.
kdrag0n将近 2 年前
Honestly, I want to like Supabase but a lot of this resonates with me even for a fairly small project. I also ended up with 3 user tables due to RLS limitations: auth users, public user profile info, and private user info (e.g. Stripe customer IDs). PostgREST&#x27;s limitations also had me going back to an API server architecture because I definitely didn&#x27;t want to write logic in database functions.<p>The only reason I haven&#x27;t migrated yet is because I&#x27;d have to rewrite the data layer to use Prisma&#x2F;Drizzle instead of Supabase&#x27;s PostgREST client, and considering that this is a side project, the problems aren&#x27;t quite big enough to justify that.
评论 #36008056 未加载
iowahansen将近 2 年前
Real-world &quot;things we ran into&quot; stories like this are super helpful when choosing a service or technology.<p>Unfortunately, I have a similar experience with Firebase, where I wish I would have known that:<p>* Don&#x27;t like the text of your Firebase Auth SMS verification message that we send on your behalf -&gt; tough luck<p>* Your app name is longer than 15 characters? We are not going to include that hash in your Firebase Auth SMS message that is required by Android to perform an automatic login.<p>* Global Firebase Auth SMS pricing does not work you economically? Welcome to implement the whole thing yourself anyways.<p>* Dealing with development environments is flakey, as Firebase&#x27;s emulators work 98% similar to production, but you will regularly hit things that are different.<p>* You can&#x27;t completely automate environment creation&#x2F;tear down, as not everything is covered by Terraform or Google&#x27;s own APIs, so you will end up doing manual things in their admin interface.<p>* Real-time subscriptions in Firestore end up not being worth the tight schema coupling between client and server, as you can&#x27;t control when the updates fire and you end up with a lot more unintended side effects than what this technology benefits you.<p>So after a year of workarounds you finally end up deeply understanding the trade-offs involved in Firebase and make the decision that its downsides exceed its out of the box benefits. :(
dpflan将近 2 年前
Wondering if the supabase CEO or any customers here can discuss scale. What “size” applications are doing really well on supabase? Are there any customers with TBs (or more) of data? What sort of performance are they achieving? Any customers with previous experience at a larger scale that are now using supabase and similar or larger scale, how are things going? What’s the average development team size of customers?
tacker2000将近 2 年前
I mean i get that using such a service will somewhat speed up the initial “time to release”, but i still dont understand why i would use such a layer on top of a normal DB instead of just using a programming framework with an ORM or even a direct DB connection.<p>After some time you just run into limitations and have to maneuver the around weird stuff that somehow the platform has imposed on you, things that just wont happen if you just use the vanilla DB.<p>The passage in the article about the DB going offline during a backup every day at midnight is just insane to be honest.<p>Also these services typically cost much more than just self hosting a DB.<p>And why the hell would i ever put any amount of substantial business logic in the DB itself? Yes there are maybe speed benefits but in most cases the added burden of doing this is not necessary, compared with using actual code.
atentaten将近 2 年前
When using Supabase, I haven’t had any issues with the webui because I mainly use dbeaver to work with Postgres instead.
gajus将近 2 年前
Curious why have you decided for Drizzle over Kysely.<p>I was recently exploring the space, and Kysely came on top as a framework with broader adoption.<p><a href="https:&#x2F;&#x2F;npmtrends.com&#x2F;drizzle-orm-vs-kysely" rel="nofollow">https:&#x2F;&#x2F;npmtrends.com&#x2F;drizzle-orm-vs-kysely</a>
评论 #36156272 未加载
评论 #36006079 未加载
评论 #36006050 未加载
评论 #36005866 未加载
评论 #36011581 未加载
armatav将近 2 年前
It definitely needs DB branching.
评论 #36006316 未加载
joelrwilliams1将近 2 年前
What was most shocking to me was that it took a week to migrate 40GB.<p>I once migrated 1TB from RDS Oracle to RDS Aurora MySQL in 6 hours. I&#x27;m not familiar with Supabase, maybe there&#x27;s a lot more to the data migration process?
评论 #36011034 未加载
评论 #36011448 未加载
neximo64将近 2 年前
Can someone explain a bit better what the issues are. What exactly are the issues with migration if you use an SQL script to do the migration instead of the supabase interface?
评论 #36007635 未加载
bodecker将近 2 年前
(Significantly edited after discussion)<p>I also had a tough time working w&#x2F; an app someone else built on Supabase. We kept bumping up against what felt like &quot;I know feature X exists in postgres, but it&#x27;s &#x27;coming soon&#x27; in Supabase.&quot; IIRC the blocker was specific to the trigger&#x2F;edge function behavior.<p>However after reflecting more, I don&#x27;t remember enough to make a detailed case. Perhaps the issue was with our use of the product.
评论 #36007204 未加载
doctorpangloss将近 2 年前
&gt; The CLI manages the Supabase stack locally: Postgres, gotrue, a realtime server, the storage API, an API gateway, an image resizing proxy, a restful API for managing Postgres, the Studio web interface, an edge runtime, a logging system, and more – a total of 11 Docker containers connected together.<p>Can Supabase author a set of Kubernetes manifests similar to what they run in production, and perhaps distribute those?
评论 #36006519 未加载
AlchemistCamp将近 2 年前
Render.com is pricey, but very underrated.<p>If your business model isn’t broken by their pricing model, I really don’t know an easier&#x2F;more time-efficient choice.
Ken_At_EM将近 2 年前
This echos my experience with Supabase exactly. We migrated to a similar solution for the same reasons.
pbreit将近 2 年前
The options for spinning up CRUD apps (ie, 95% of projects) are still quite miserable.
评论 #36005928 未加载
评论 #36006426 未加载
评论 #36006100 未加载
throwawaymaths将近 2 年前
Amazed they used scp instead of rsync
评论 #36008425 未加载
aguynamedben将近 2 年前
I love Steve Krouse!!!