doc/md: update versioned-migrations (#3341)

* Update versioned-migrations.mdx

* Update versioned-migrations.mdx
This commit is contained in:
Noam Cattan
2023-02-24 09:55:37 +02:00
committed by GitHub
parent d3dc7d05cd
commit a151f7cb27

View File

@@ -30,55 +30,10 @@ defined by the `ent/schema` package and writes a migration plan for moving from
### Applying migrations
<AtlasMigrateApply/>
To apply the pending migration files onto the database, run the following command:
<Tabs
defaultValue="mysql"
values={[
{label: 'MySQL', value: 'mysql'},
{label: 'MariaDB', value: 'maria'},
{label: 'PostgreSQL', value: 'postgres'},
{label: 'SQLite', value: 'sqlite'},
]}>
<TabItem value="mysql">
```shell
atlas migrate apply \
--dir "file://ent/migrate/migrations" \
--url "mysql://root:pass@localhost:3306/example"
```
</TabItem>
<TabItem value="maria">
```shell
atlas migrate apply \
--dir "file://ent/migrate/migrations" \
--url "maria://root:pass@localhost:3306/example"
```
</TabItem>
<TabItem value="postgres">
```shell
atlas migrate apply \
--dir "file://ent/migrate/migrations" \
--url "postgres://postgres:pass@localhost:5432/database?search_path=public&sslmode=disable"
```
</TabItem>
<TabItem value="sqlite">
```shell
atlas migrate apply \
--dir "file://ent/migrate/migrations" \
--url "sqlite://file.db?_fk=1"
```
</TabItem>
</Tabs>
<AtlasMigrateApply/>
For more information head over to the [Atlas documentation](https://atlasgo.io/versioned/apply).