From a85377846f75d58a21129aed9d28fedea7202387 Mon Sep 17 00:00:00 2001
From: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
Date: Tue, 17 Jan 2023 16:30:27 +0200
Subject: [PATCH] doc/versioned: more examples on how to install and execute
migrate lint (#3249)
---
doc/md/versioned-migrations.mdx | 113 +++++++++++++++++++++++++++++++-
1 file changed, 110 insertions(+), 3 deletions(-)
diff --git a/doc/md/versioned-migrations.mdx b/doc/md/versioned-migrations.mdx
index 72c4464c9..c56a000ed 100644
--- a/doc/md/versioned-migrations.mdx
+++ b/doc/md/versioned-migrations.mdx
@@ -466,13 +466,120 @@ Let's run `atlas migrate lint` with the necessary parameters to run migration li
- (optional) `--latest` run analysis on the latest `N` migration files.
- (optional) `--git-base` run analysis against the base Git branch.
-```bash
-go run -mod=mod ariga.io/atlas/cmd/atlas@master migrate lint \
- --dev-url="mysql://root:pass@localhost:3306/test" \
+#### Install Atlas:
+
+To install the latest release of Atlas, simply run one of the following in your terminal, or check out the
+[Atlas website](https://atlasgo.io/getting-started#installation):
+
+
+
+
+```shell
+curl -sSf https://atlasgo.sh | sh
+```
+
+
+
+
+```shell
+brew install ariga/tap/atlas
+```
+
+
+
+
+```shell
+go install ariga.io/atlas/cmd/atlas@master
+```
+
+
+
+
+```shell
+docker pull arigaio/atlas
+docker run --rm arigaio/atlas --help
+```
+
+If the container needs access to the host network or a local directory, use the `--net=host` flag and mount the desired
+directory:
+
+```shell
+docker run --rm --net=host \
+ -v $(pwd)/migrations:/migrations \
+ arigaio/atlas migrate apply
+ --url "mysql://root:pass@:3306/test"
+```
+
+
+
+
+Download the [latest release](https://release.ariga.io/atlas/atlas-windows-amd64-latest.exe) and
+move the atlas binary to a file location on your system PATH.
+
+
+
+
+#### Run the `atlas migrate lint` command:
+
+
+
+
+
+```shell
+atlas migrate lint \
+ --dev-url="docker://mysql/8/test" \
--dir="file://ent/migrate/migrations" \
--latest=1
```
+
+
+
+```shell
+atlas migrate lint \
+ --dev-url="docker://mariadb/latest/test" \
+ --dir="file://ent/migrate/migrations" \
+ --latest=1
+```
+
+
+
+
+```shell
+atlas migrate lint \
+ --dev-url="docker://postgres/15/test?search_path=public" \
+ --dir="file://ent/migrate/migrations" \
+ --latest=1
+```
+
+
+
+
+```shell
+atlas migrate lint \
+ --dev-url="sqlite://file?mode=memory" \
+ --dir="file://ent/migrate/migrations" \
+ --latest=1
+```
+
+
+
+
An output of such a run might look as follows:
```text {3,7}