docs(cli): change URL path from /commands/ to /cli/
This commit is contained in:
parent
0c597fd7a8
commit
1d33d65135
17 changed files with 25 additions and 20 deletions
5
.changeset/funny-elephants-live.md
Normal file
5
.changeset/funny-elephants-live.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@emigrate/docs': major
|
||||||
|
---
|
||||||
|
|
||||||
|
Rename the URL path "/commands/" to "/cli/" to make it more clear that those pages are the documentation for the CLI. This change is a BREAKING CHANGE because it changes the URL path of the pages.
|
||||||
|
|
@ -30,4 +30,4 @@
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
|
||||||
- cbc35bd: Add first version of the [Baseline guide](https://emigrate.dev/guides/baseline)
|
- cbc35bd: Add first version of the [Baseline guide](https://emigrate.dev/guides/baseline)
|
||||||
- cbc35bd: Document the new --limit, --from and --to options for the ["up" command](https://emigrate.dev/commands/up/)
|
- cbc35bd: Document the new --limit, --from and --to options for the ["up" command](https://emigrate.dev/cli/up/)
|
||||||
|
|
|
||||||
|
|
@ -82,26 +82,26 @@ export default defineConfig({
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
label: 'Introduction',
|
label: 'Introduction',
|
||||||
link: '/commands/',
|
link: '/cli/',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Commands',
|
label: 'Commands',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
label: 'emigrate up',
|
label: 'emigrate up',
|
||||||
link: '/commands/up/',
|
link: '/cli/up/',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'emigrate list',
|
label: 'emigrate list',
|
||||||
link: '/commands/list/',
|
link: '/cli/list/',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'emigrate new',
|
label: 'emigrate new',
|
||||||
link: '/commands/new/',
|
link: '/cli/new/',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'emigrate remove',
|
label: 'emigrate remove',
|
||||||
link: '/commands/remove/',
|
link: '/cli/remove/',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ The `remove` command is used to remove a migration from the history. This is use
|
||||||
|
|
||||||
The name of the migration file to remove, including the extension, e.g. `20200101000000_some_migration.js`, or a relative file path to a migration file to remove, e.g: `migrations/20200101000000_some_migration.js`.
|
The name of the migration file to remove, including the extension, e.g. `20200101000000_some_migration.js`, or a relative file path to a migration file to remove, e.g: `migrations/20200101000000_some_migration.js`.
|
||||||
|
|
||||||
Using relative file paths is useful in terminals that support autocomplete, and also when you copy and use the relative migration file path from the output of the <Link href="/commands/list/">`list`</Link> command.
|
Using relative file paths is useful in terminals that support autocomplete, and also when you copy and use the relative migration file path from the output of the <Link href="/cli/list/">`list`</Link> command.
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
|
|
||||||
|
|
@ -113,8 +113,8 @@ CREATE TABLE public.posts (
|
||||||
|
|
||||||
### Log the baseline migration
|
### Log the baseline migration
|
||||||
|
|
||||||
For new environments this baseline migration will automatically be run when you run <Link href="/commands/up/">`emigrate up`</Link>.
|
For new environments this baseline migration will automatically be run when you run <Link href="/cli/up/">`emigrate up`</Link>.
|
||||||
For any existing environments you will need to run `emigrate up` with the <Link href="/commands/up/#--no-execution">`--no-execution`</Link> flag to prevent the migration from being executed and only log the migration:
|
For any existing environments you will need to run `emigrate up` with the <Link href="/cli/up/#--no-execution">`--no-execution`</Link> flag to prevent the migration from being executed and only log the migration:
|
||||||
|
|
||||||
<Tabs>
|
<Tabs>
|
||||||
<TabItem label="npm">
|
<TabItem label="npm">
|
||||||
|
|
@ -155,7 +155,7 @@ For any existing environments you will need to run `emigrate up` with the <Link
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
In case you have already added more migration files to your migration directory you can limit the "up" command to just log the baseline migration by specifying the <Link href="/commands/up/#-t---to-name">`--to`</Link> option:
|
In case you have already added more migration files to your migration directory you can limit the "up" command to just log the baseline migration by specifying the <Link href="/cli/up/#-t---to-name">`--to`</Link> option:
|
||||||
|
|
||||||
<Tabs>
|
<Tabs>
|
||||||
<TabItem label="npm">
|
<TabItem label="npm">
|
||||||
|
|
@ -198,7 +198,7 @@ In case you have already added more migration files to your migration directory
|
||||||
|
|
||||||
### Verify the baseline migration status
|
### Verify the baseline migration status
|
||||||
|
|
||||||
You can verify the status of the baseline migration by running the <Link href="/commands/list/">`emigrate list`</Link> command:
|
You can verify the status of the baseline migration by running the <Link href="/cli/list/">`emigrate list`</Link> command:
|
||||||
|
|
||||||
<Tabs>
|
<Tabs>
|
||||||
<TabItem label="npm">
|
<TabItem label="npm">
|
||||||
|
|
@ -251,5 +251,5 @@ Emigrate list v0.14.1 /your/project/path
|
||||||
|
|
||||||
### Happy migrating!
|
### Happy migrating!
|
||||||
|
|
||||||
You can now start adding new migrations to your migration directory and run <Link href="/commands/up/">`emigrate up`</Link> to apply them to your database.
|
You can now start adding new migrations to your migration directory and run <Link href="/cli/up/">`emigrate up`</Link> to apply them to your database.
|
||||||
Which should be part of your CD pipeline to ensure that your database schema is always up to date in each environment.
|
Which should be part of your CD pipeline to ensure that your database schema is always up to date in each environment.
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ After installing `tsx` you can load it in two ways.
|
||||||
|
|
||||||
#### Via CLI
|
#### Via CLI
|
||||||
|
|
||||||
Using the <Link href="/commands/up/#-i---import-module">`--import`</Link> flag you can load `tsx` before running your migration files.
|
Using the <Link href="/cli/up/#-i---import-module">`--import`</Link> flag you can load `tsx` before running your migration files.
|
||||||
|
|
||||||
<Tabs>
|
<Tabs>
|
||||||
<TabItem label="npm">
|
<TabItem label="npm">
|
||||||
|
|
|
||||||
|
|
@ -22,5 +22,5 @@ The generator is responsible for generating migration files in a specific format
|
||||||
</CardGrid>
|
</CardGrid>
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
Instead of having to install a generator plugin, you can also use the much simpler <Link href="/commands/new/#-t---template-path">`--template`</Link> option to specify a custom template file for new migrations.
|
Instead of having to install a generator plugin, you can also use the much simpler <Link href="/cli/new/#-t---template-path">`--template`</Link> option to specify a custom template file for new migrations.
|
||||||
:::
|
:::
|
||||||
|
|
|
||||||
|
|
@ -79,4 +79,4 @@ A <Link href="/plugins/generators/">generator plugin</Link> for generating new m
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
For more information see <Link href="/commands/new/">the `new` command</Link>'s documentation.
|
For more information see <Link href="/cli/new/">the `new` command</Link>'s documentation.
|
||||||
|
|
|
||||||
|
|
@ -79,4 +79,4 @@ The MySQL generator creates new migration files with the `.sql` extension. In th
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
For more information see <Link href="/commands/new/">the `new` command</Link>'s documentation.
|
For more information see <Link href="/cli/new/">the `new` command</Link>'s documentation.
|
||||||
|
|
|
||||||
|
|
@ -79,4 +79,4 @@ The PostgreSQL generator creates new migration files with the `.sql` extension.
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
For more information see <Link href="/commands/new/">the `new` command</Link>'s documentation.
|
For more information see <Link href="/cli/new/">the `new` command</Link>'s documentation.
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ The reporter is included by default and does not need to be installed separately
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
See for instance the <Link href="/commands/up/#-r---reporter-name">Reporter Option</Link> for the `up` command for more information.
|
See for instance the <Link href="/cli/up/#-r---reporter-name">Reporter Option</Link> for the `up` command for more information.
|
||||||
|
|
||||||
### Via configuration file
|
### Via configuration file
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ The `@emigrate/reporter-` prefix is optional when using this reporter.
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
See for instance the <Link href="/commands/up/#-r---reporter-name">Reporter Option</Link> for the `up` command for more information.
|
See for instance the <Link href="/cli/up/#-r---reporter-name">Reporter Option</Link> for the `up` command for more information.
|
||||||
|
|
||||||
### Via configuration file
|
### Via configuration file
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ The reporter is included by default and does not need to be installed separately
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
By default, Emigrate uses the "pretty" reporter, but it can also be explicitly set by using the <Link href="/commands/up/#-r---reporter-name">`--reporter`</Link> flag.
|
By default, Emigrate uses the "pretty" reporter, but it can also be explicitly set by using the <Link href="/cli/up/#-r---reporter-name">`--reporter`</Link> flag.
|
||||||
|
|
||||||
<Tabs>
|
<Tabs>
|
||||||
<TabItem label="npm">
|
<TabItem label="npm">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue