File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/pages/[platform]/reference/cli-commands Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -332,6 +332,26 @@ npx ampx generate graphql-client-code --format modelgen --type-target angular
332
332
| Modelgen | Amplify Flutter | ` amplify codegen model ` | ` npx ampx generate graphql-client-code --format modelgen --model-target dart --out <path_to_flutter_project>/AmplifyModels ` | ` <path_to_flutter_project>/AmplifyModels ` |
333
333
334
334
335
+ ## npx ampx generate schema-from-database
336
+
337
+ Generates typescript data schema from a SQL database.
338
+
339
+ ### Options
340
+
341
+ - ` --stack ` (_ string_ ) - A stack name that contains an Amplify backend.
342
+ - ` --branch ` (_ string_ ) - Name of the git branch being deployed.
343
+ - ` --app-id ` (_ string_ ) - The app id of the target Amplify app.
344
+ - ` --out ` (_ string_ ) - A path to directory where generated schema is written [ default: ` ./amplify/data/schema.sql.ts ` ] .
345
+ - ` --connection-uri-secret ` (_ string_ ) - Amplify secret name for the database connection uri.
346
+ - ` --ssl-cert-secret ` (_ string_ ) - Amplify secret name for the database ssl certificate.
347
+ - ` --profile ` (_ string_ ) - An AWS profile name.
348
+
349
+ ### Usage
350
+
351
+ ``` bash title="Terminal" showLineNumbers={false}
352
+ npx ampx generate schema-from-database --connection-uri-secret SQL_CONNECTION_STRING --out amplify/data/schema.sql.ts
353
+ ```
354
+
335
355
## npx ampx generate forms
336
356
337
357
Generate React form components derived from your backend data models for your frontend application to consume.
You can’t perform that action at this time.
0 commit comments