supabase-community / database-build

In-browser Postgres sandbox with AI assistance (formerly postgres.new)
https://database.build
Apache License 2.0
2.49k stars 197 forks source link

Import error #114

Closed hofq closed 4 weeks ago

hofq commented 1 month ago

Bug report

Describe the bug

I am not able to Migrate postgres.new to database.build, because of an Import issue

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Export your Data from postgres.new
  2. Import to database.build
  3. open first db
  4. See error

Expected behavior

See the Database open as it does in postgres.new

Screenshots

grafik

System information

Additional context

My Export: postgres.new(1).tar.gz

gregnr commented 1 month ago

Thanks for reporting @hofq. Can you confirm which browser this is in (I only see Browser 131.0.2)? Also if possible, could you provide the contents of the Migrations tab for each database you exported from postgres.new?

Thanks!

hofq commented 1 month ago

Ah yes, running Firefox but tried importing in chrome also

rashidpathiyil commented 1 month ago

When I try to import postgres.new.tar.gz

image
gregnr commented 4 weeks ago

Still digging into this - by chance do you remember if you had multiple tabs open during import? Seeing some bugs here and there related to having multiple tabs of databaes.build open at the same time, and I wondering if it's related (especially since you mentioned BroadcastChannel @rashidpathiyil)

If yes, could you try importing again while ensuring only one tab is open for database.build?

gregnr commented 4 weeks ago

Okay I believe I've gotten to the root cause of the n.map is not a function error. It's related to a bug in the import logic that was introduced when we upgraded a dependency (PGlite), unrelated to multiple tabs being open. Fixed in https://github.com/supabase-community/postgres-new/pull/127.

gregnr commented 4 weeks ago

This is now merged to prod: https://database.build/import

Closing this now, but please do let me know if still experience issues importing.

@rashidpathiyil since your bug looks a bit different, if you continue to experience that issue would you mind opening a new issue?

rashidpathiyil commented 4 weeks ago

@gregnr I am still facing the issue #129

hofq commented 4 weeks ago

hi @gregnr
Can confirm import works :)