#Migrating data from another DB while preserving order

5 messages · Page 1 of 1 (latest)

wintry folio
#

Hi,

Im migrating data from Supabase to Convex. My app displays a paginated list of media items which are ordered by the "order" query modifier. I presume that it is ordered by _creationTime.

My problem is that I batch migrate my data and all my media item records have the same _creationTime.

  1. Can I order by a custom field and not _creationTime?
  2. If not, since _creationTime is not modifiable, any idea what I can do to solve this issue?

Thanks and Merry Christmas!

tidal wagonBOT
#

Thanks for posting in #1088161997662724167.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.

    - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
    - Use [search.convex.dev](https://search.convex.dev) to search Docs, Stack, and Discord all at once.
    - Additionally, you can post your questions in the Convex Community's #1228095053885476985 channel to receive a response from AI.
    - Avoid tagging staff unless specifically instructed.

    Thank you!
robust galleon
wintry folio
#

ugh, i wanted to do JIT import when a user opts to use the new version of the app. guess ill need to either do it manually on my laptop or have a server listen to events and run a cli command

robust galleon
#

you can do this during "runtime" just not within convex itself, but you can use node/bun on a different server (or as serverless function) that runs the import command with the data you need.
I'm also in in a migration towards Convex and faced the same issue, I chose for the option to do a live migration, because I don't have a lot of users / activity yet (as my migration script, running locally, for prod data finishes within 1 minute)