Conversation
|
I'll say I tried using ChatGPT when writing my fork of your script and I think it really struggles with making coherent bash scripts 😆 For background, the reason I forked your script instead of making a PR is that I think this functionality is different enough that it makes generalizing the logic far too complex for a scripting language. Too many edge cases. A proper typed language could probably handle all these logic forks, but I find complex bash to be nearly alien. Some initial notes:
In general, rather than merging the logic, it seems that Codex basically copied in the forked script alongside the existing one, which sort of defeats the purpose. I appreciate the thought here wrt making One Script to Rule Them All, though I think it's really okay for this niche use case to live in its own script. For broader context, my intention is to eventually create a toolkit for migrating from https://github.com/redwoodjs/graphql to https://github.com/redwoodjs/sdk — the script is only part of that. That said, if you want to forge ahead with this, let me know! I'd be happy to help you come up with a robust set of test cases. |
|
OH @hirefrank — the one simple change that you can certainly incorporate to your script is the one for converting the date format — https://gist.github.com/arimendelow/e60f8a1303dc00bd4a21e84142623dbc#file-psql-to-d1-sh-L67 Note that you'll need to switch from just doing |
Summary
--d1migrate_d1.sh--d1flag in READMETesting
bash -n migrate.shhttps://chatgpt.com/codex/tasks/task_e_6842d9d663d0833082aaaece89705fac