Skip to content

adding gen 2 instructions for mySQL / postgreSQL support #6600

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

Closed
wants to merge 9 commits into from

Conversation

renebrandel
Copy link
Contributor

Description of changes:

Related GitHub issue #, if available:

Instructions

If this PR should not be merged upon approval for any reason, please submit as a DRAFT

Which product(s) are affected by this PR (if applicable)?

  • amplify-cli
  • amplify-ui
  • amplify-studio
  • amplify-hosting
  • amplify-libraries

Which platform(s) are affected by this PR (if applicable)?

  • JS
  • iOS
  • Android
  • Flutter
  • React Native

Please add the product(s)/platform(s) affected to the PR title

Checks

  • Does this PR conform to the styleguide?

  • Does this PR include filetypes other than markdown or images? Please add or update unit tests accordingly.

  • Are any files being deleted with this PR? If so, have the needed redirects been created?

  • Are all links in MDX files using the MDX link syntax rather than HTML link syntax?

    ref: MDX: [link](https://link.com)
    HTML: <a href="https://link.com">link</a>

When this PR is ready to merge, please check the box below

  • Ready to merge

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added the redirects-needed Redirects need to be created for deleted pages label Dec 4, 2023
Copy link

mergify bot commented Dec 4, 2023

@renebrandel, since a file was deleted from the src/pages and/or src/fragments directories, redirects might need to be set up so these previous pages do not 404. If redirects are needed, please answer these questions for each redirect that is needed:

  • What is the source address of the redirect? (Where are you trying to redirect from?)

  • What is the target address of the redirect? (Where are you trying to redirect to?)

  • Type of redirect? 301 - permanent redirect or 302 - temporary redirect? (More info on Amplify Hosting redirects here: https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html)

// highlight-end

const schema = a.schema({
Todo: a.model({
Copy link
Member

Choose a reason for hiding this comment

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

Need to call this something else if we're renaming the sql model -> Todo, because otherwise we'll have a naming collision

// Rename models or fields to be more idiomatic for frontend code
// highlight-start
rdsSchema.models.todos.renameTo("Todo")
rdsSchema.models.todos.fields.title.renameTo("content")
Copy link
Member

Choose a reason for hiding this comment

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

Same DX changes as above

renebrandel and others added 5 commits April 16, 2024 11:14
…se/index.mdx

Co-authored-by: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>
…se/index.mdx

Co-authored-by: Christopher Sundersingh <83315412+sundersc@users.noreply.github.com>
…se/index.mdx

Co-authored-by: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>
…se/index.mdx

Co-authored-by: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>
Co-authored-by: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>
```ts
import { a, defineData } from '@aws-amplify/backend';
// highlight-next-line
import { schema as auroraSchema } from './schema.rds.ts';
Copy link
Contributor

@phani-srikar phani-srikar Apr 17, 2024

Choose a reason for hiding this comment

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

nit: Is there any particular reason for using auroraSchema versus a more general sqlSchema?


```ts
import { a, defineData } from '@aws-amplify/backend'
import { schema as rdsSchema } from './schema.rds.ts'
Copy link
Contributor

Choose a reason for hiding this comment

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

here and in other snippets, specifying .ts gives the following error in my VS Code IDE with default settings:
Screenshot 2024-04-17 at 12 22 13 PM
We could skip that extension and that resolves it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
redirects-needed Redirects need to be created for deleted pages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants