Skip to content

Explain how to rename a table#7655

Merged
dreyfus92 merged 10 commits intomainfrom
db-rename
Apr 6, 2024
Merged

Explain how to rename a table#7655
dreyfus92 merged 10 commits intomainfrom
db-rename

Conversation

@matthewp
Copy link
Copy Markdown
Contributor

Description (required)

Explains how to rename a table in Astro DB.

Related issues & labels (optional)

@vercel
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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!

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

matthewp commented Apr 4, 2024

Looks great! I like the steps.

@sarah11918
Copy link
Copy Markdown
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
Copy Markdown
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
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.

3 participants