Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain how to rename a table #7655

Merged
merged 10 commits into from
Apr 6, 2024
Merged

Explain how to rename a table #7655

merged 10 commits into from
Apr 6, 2024

Conversation

matthewp
Copy link
Contributor

Description (required)

Explains how to rename a table in Astro DB.

Related issues & labels (optional)

Copy link

vercel bot commented Mar 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Apr 6, 2024 3:24am
1 Ignored Deployment
Name Status Preview Updated (UTC)
docs-i18n ⬜️ Ignored (Inspect) Apr 6, 2024 3:24am

@sarah11918 sarah11918 added add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!) labels Mar 29, 2024
@sarah11918
Copy link
Member

I'm not completely reviewing this yet, @matthewp , but first want to clarify:

"Renaming Tables" is a "Studio Feature" because if you were just working locally, your DB is entirely built from scratch from your seeded data each time and there's nothing conflicting to "match" your schema to? (i.e. if you were just working locally, you'd rename the table in config and in your seed.ts and there would be nothing to conflict with? You can just rewrite over and no problems?)

@matthewp
Copy link
Contributor Author

Yes, you would probably never use push for the local database. At least we don't have a reason for it, yet.

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @matthewp ! Just have some suggestions for you to take a look at! When you're happy with this, I'll edit the file directly and make sure all the formatting is good, and add our new ` component for the set of instructions!

src/content/docs/en/guides/astro-db.mdx Show resolved Hide resolved
src/content/docs/en/guides/astro-db.mdx Outdated Show resolved Hide resolved
src/content/docs/en/guides/astro-db.mdx Outdated Show resolved Hide resolved
src/content/docs/en/guides/astro-db.mdx Outdated Show resolved Hide resolved
src/content/docs/en/guides/astro-db.mdx Outdated Show resolved Hide resolved
matthewp and others added 3 commits April 3, 2024 13:14
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
@matthewp
Copy link
Contributor Author

matthewp commented Apr 3, 2024

@sarah11918 this looks good to me now: https://docs-2vbv6g27f-astrodotbuild.vercel.app/en/guides/astro-db/#renaming-tables. What do you think?

@sarah11918
Copy link
Member

@matthewp I'm happy with the text if you are! Some of the indenting of the code samples is wonky, and I'll add our new fancy <Steps /> component for the instructions.

Let me edit this locally with a preview so I can get the syntax all correct, then you can preview the final output!

@sarah11918
Copy link
Member

@matthewp This looked fine locally to me now (though admittedly, the indenting tricks I had to play are a little sus). We'll check they preview here after this builds, and if the code samples look OK, then I think this is good to go!

@matthewp
Copy link
Contributor Author

matthewp commented Apr 4, 2024

Looks great! I like the steps.

@sarah11918
Copy link
Member

Great! Looks good to me too, @matthewp !

I see in the linked PR that you want the docs to merge first here. Do you want this merged now?

@matthewp
Copy link
Contributor Author

matthewp commented Apr 4, 2024

@sarah11918 Yes please!

@sarah11918 sarah11918 added Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! and removed merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!) labels Apr 4, 2024
@dreyfus92 dreyfus92 merged commit b83b66d into main Apr 6, 2024
7 checks passed
@dreyfus92 dreyfus92 deleted the db-rename branch April 6, 2024 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants