Initial commit
This commit is contained in:
24
docs/Commands/m4g_db/index.md
Normal file
24
docs/Commands/m4g_db/index.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# m4g db
|
||||
|
||||
```
|
||||
Description:
|
||||
Database related commands
|
||||
|
||||
Usage:
|
||||
m4g db [command] [options]
|
||||
|
||||
Options:
|
||||
-?, -h, --help Show help and usage information
|
||||
|
||||
Commands:
|
||||
run Runs the services defined in db.docker-compose.yml
|
||||
stop Stops db.docker-compose.yml
|
||||
migrate Apply migrations to the database
|
||||
rollback Rollback the last migration
|
||||
g, generate Generate a database item
|
||||
link Define relationships between entities
|
||||
```
|
||||
20
docs/Commands/m4g_db/m4g_db_generate/index.md
Normal file
20
docs/Commands/m4g_db/m4g_db_generate/index.md
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# m4g db generate
|
||||
|
||||
```
|
||||
Description:
|
||||
Generate a database item
|
||||
|
||||
Usage:
|
||||
m4g db generate [command] [options]
|
||||
|
||||
Options:
|
||||
-?, -h, --help Show help and usage information
|
||||
|
||||
Commands:
|
||||
e, entity <name> Generate and database entity
|
||||
m, migration <name> Generate a migration
|
||||
```
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# m4g db generate entity
|
||||
|
||||
```
|
||||
Description:
|
||||
Generate and database entity
|
||||
|
||||
Usage:
|
||||
m4g db generate entity <name> [options]
|
||||
|
||||
Arguments:
|
||||
<name> The name of the database entity
|
||||
|
||||
Supported formats:
|
||||
Entity
|
||||
path/relative/to/entities:Entity
|
||||
|
||||
Options:
|
||||
-c, --column <column> Specify the fields to add.
|
||||
|
||||
Format:
|
||||
<name>:<native_type>:<orm_type>
|
||||
|
||||
<name> = Name of the column
|
||||
<native_type> = The native Python type
|
||||
<orm_type> = The SQLAlchemy type
|
||||
|
||||
Example:
|
||||
first_name:str:String(255)
|
||||
-?, -h, --help Show help and usage information
|
||||
|
||||
```
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# m4g db generate migration
|
||||
|
||||
```
|
||||
Description:
|
||||
Generate a migration
|
||||
|
||||
Usage:
|
||||
m4g db generate migration <name> [options]
|
||||
|
||||
Arguments:
|
||||
<name> The name of the migration
|
||||
|
||||
Options:
|
||||
-?, -h, --help Show help and usage information
|
||||
```
|
||||
21
docs/Commands/m4g_db/m4g_db_link/index.md
Normal file
21
docs/Commands/m4g_db/m4g_db_link/index.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# m4g db link
|
||||
|
||||
```
|
||||
Description:
|
||||
Define relationships between entities
|
||||
|
||||
Usage:
|
||||
m4g db link [command] [options]
|
||||
|
||||
Options:
|
||||
-?, -h, --help Show help and usage information
|
||||
|
||||
Commands:
|
||||
one <entity> Define a 1:n relation
|
||||
many <entity> Define a n:m relation
|
||||
|
||||
```
|
||||
21
docs/Commands/m4g_db/m4g_db_link/m4g_db_link_many.md
Normal file
21
docs/Commands/m4g_db/m4g_db_link/m4g_db_link_many.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# m4g db link many
|
||||
|
||||
```
|
||||
Description:
|
||||
Define a n:m relation
|
||||
|
||||
Usage:
|
||||
m4g db link many <entity> [options]
|
||||
|
||||
Arguments:
|
||||
<entity> The left side of the relation
|
||||
|
||||
Options:
|
||||
--to-one <to-one> The right side of the relation
|
||||
--to-many <to-many> The right side of the relation
|
||||
-?, -h, --help Show help and usage information
|
||||
```
|
||||
21
docs/Commands/m4g_db/m4g_db_link/m4g_db_link_one.md
Normal file
21
docs/Commands/m4g_db/m4g_db_link/m4g_db_link_one.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# m4g db link one
|
||||
|
||||
```
|
||||
Description:
|
||||
Define a 1:n relation
|
||||
|
||||
Usage:
|
||||
m4g db link one <entity> [options]
|
||||
|
||||
Arguments:
|
||||
<entity> The left side of the relation
|
||||
|
||||
Options:
|
||||
--to-one <to-one> The right side of the relation
|
||||
--to-many <to-many> The right side of the relation
|
||||
-?, -h, --help Show help and usage information
|
||||
```
|
||||
16
docs/Commands/m4g_db/m4g_db_migrate.md
Normal file
16
docs/Commands/m4g_db/m4g_db_migrate.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# m4g db migrate
|
||||
|
||||
```
|
||||
Description:
|
||||
Apply migrations to the database
|
||||
|
||||
Usage:
|
||||
m4g db migrate [options]
|
||||
|
||||
Options:
|
||||
-?, -h, --help Show help and usage information
|
||||
```
|
||||
16
docs/Commands/m4g_db/m4g_db_rollback.md
Normal file
16
docs/Commands/m4g_db/m4g_db_rollback.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# m4g db rollback
|
||||
|
||||
```
|
||||
Description:
|
||||
Rollback the last migration
|
||||
|
||||
Usage:
|
||||
m4g db rollback [options]
|
||||
|
||||
Options:
|
||||
-?, -h, --help Show help and usage information
|
||||
```
|
||||
16
docs/Commands/m4g_db/m4g_db_run.md
Normal file
16
docs/Commands/m4g_db/m4g_db_run.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# m4g db run
|
||||
|
||||
```
|
||||
Description:
|
||||
Runs the services defined in db.docker-compose.yml
|
||||
|
||||
Usage:
|
||||
m4g db run [options]
|
||||
|
||||
Options:
|
||||
-?, -h, --help Show help and usage information
|
||||
```
|
||||
16
docs/Commands/m4g_db/m4g_db_stop.md
Normal file
16
docs/Commands/m4g_db/m4g_db_stop.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# m4g db stop
|
||||
|
||||
```
|
||||
Description:
|
||||
Stops db.docker-compose.yml
|
||||
|
||||
Usage:
|
||||
m4g db stop [options]
|
||||
|
||||
Options:
|
||||
-?, -h, --help Show help and usage information
|
||||
```
|
||||
Reference in New Issue
Block a user