mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
doc/md: update versioned-migrations (#3341)
* Update versioned-migrations.mdx * Update versioned-migrations.mdx
This commit is contained in:
@@ -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).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user