@enjoys/context-engine 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/commands/adb.json +322 -0
- package/data/commands/alembic.json +301 -0
- package/data/commands/artisan.json +277 -0
- package/data/commands/atlas.json +426 -0
- package/data/commands/auth0.json +648 -0
- package/data/commands/bat.json +84 -0
- package/data/commands/bundle.json +321 -0
- package/data/commands/composer.json +507 -0
- package/data/commands/dart.json +216 -0
- package/data/commands/dbmate.json +257 -0
- package/data/commands/docker-compose.json +384 -0
- package/data/commands/drizzle-kit.json +217 -0
- package/data/commands/expo.json +65 -0
- package/data/commands/fastlane.json +243 -0
- package/data/commands/fd.json +86 -0
- package/data/commands/flutter.json +298 -0
- package/data/commands/flyway.json +261 -0
- package/data/commands/fzf.json +103 -0
- package/data/commands/gem.json +267 -0
- package/data/commands/jq.json +100 -0
- package/data/commands/k9s.json +62 -0
- package/data/commands/liquibase.json +399 -0
- package/data/commands/manifest.json +619 -0
- package/data/commands/minikube.json +60 -0
- package/data/commands/ng.json +64 -0
- package/data/commands/nuxt.json +60 -0
- package/data/commands/php.json +157 -0
- package/data/commands/pm2.json +259 -0
- package/data/commands/pod.json +175 -0
- package/data/commands/prisma.json +257 -0
- package/data/commands/rails.json +372 -0
- package/data/commands/rake.json +360 -0
- package/data/commands/react-native.json +57 -0
- package/data/commands/rg.json +103 -0
- package/data/commands/rspec.json +257 -0
- package/data/commands/ruby.json +108 -0
- package/data/commands/sequelize.json +342 -0
- package/data/commands/snyk.json +442 -0
- package/data/commands/sonar-scanner.json +219 -0
- package/data/commands/stripe.json +314 -0
- package/data/commands/symfony.json +449 -0
- package/data/commands/tmux.json +197 -0
- package/data/commands/trivy.json +367 -0
- package/data/commands/twilio.json +382 -0
- package/data/commands/typeorm.json +262 -0
- package/data/commands/vue.json +60 -0
- package/data/commands/wp.json +857 -0
- package/data/commands/xcodebuild.json +141 -0
- package/data/commands/yq.json +57 -0
- package/data/completion/bash.json +1184 -0
- package/data/completion/c.json +1067 -0
- package/data/completion/cpp.json +824 -0
- package/data/completion/csharp.json +860 -0
- package/data/completion/dockerfile.json +536 -0
- package/data/completion/go.json +1346 -0
- package/data/completion/html.json +806 -0
- package/data/completion/java.json +1112 -0
- package/data/completion/javascript.json +914 -0
- package/data/completion/lua.json +968 -0
- package/data/completion/php.json +1535 -0
- package/data/completion/python.json +1427 -0
- package/data/completion/ruby.json +1531 -0
- package/data/completion/rust.json +698 -0
- package/data/completion/sql.json +887 -0
- package/data/completion/toml.json +428 -0
- package/data/completion/typescript.json +338 -0
- package/data/completion/yaml.json +563 -0
- package/data/defination/bash.json +565 -0
- package/data/defination/c.json +865 -0
- package/data/defination/cpp.json +348 -0
- package/data/defination/csharp.json +144 -0
- package/data/defination/dockerfile.json +113 -0
- package/data/defination/go.json +561 -0
- package/data/defination/html.json +559 -0
- package/data/defination/java.json +184 -0
- package/data/defination/javascript.json +265 -0
- package/data/defination/lua.json +181 -0
- package/data/defination/php.json +726 -0
- package/data/defination/python.json +717 -0
- package/data/defination/ruby.json +670 -0
- package/data/defination/rust.json +207 -0
- package/data/defination/sql.json +473 -0
- package/data/defination/toml.json +251 -0
- package/data/defination/typescript.json +29 -0
- package/data/defination/yaml.json +197 -0
- package/data/hover/bash.json +245 -0
- package/data/hover/c.json +265 -0
- package/data/hover/cpp.json +210 -0
- package/data/hover/csharp.json +290 -0
- package/data/hover/dockerfile.json +145 -0
- package/data/hover/go.json +580 -0
- package/data/hover/html.json +250 -0
- package/data/hover/java.json +395 -0
- package/data/hover/javascript.json +330 -0
- package/data/hover/lua.json +265 -0
- package/data/hover/php.json +300 -0
- package/data/hover/python.json +380 -0
- package/data/hover/ruby.json +265 -0
- package/data/hover/rust.json +275 -0
- package/data/hover/sql.json +230 -0
- package/data/hover/toml.json +145 -0
- package/data/hover/typescript.json +120 -0
- package/data/hover/yaml.json +165 -0
- package/data/manifest.json +242 -0
- package/package.json +1 -1
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "atlas",
|
|
3
|
+
"description": "Atlas is a modern database schema management tool by Ariga, providing declarative and versioned schema migrations with support for PostgreSQL, MySQL, SQLite, MariaDB, ClickHouse, and more",
|
|
4
|
+
"category": "database-orm",
|
|
5
|
+
"platforms": ["linux", "macos", "windows"],
|
|
6
|
+
"shells": ["bash", "zsh", "fish", "powershell"],
|
|
7
|
+
"subcommands": [
|
|
8
|
+
{
|
|
9
|
+
"name": "schema inspect",
|
|
10
|
+
"description": "Inspect the schema of a database and output it in HCL, SQL, or JSON format. Useful for understanding the current state of a database.",
|
|
11
|
+
"args": [],
|
|
12
|
+
"options": [
|
|
13
|
+
{"name": "--url", "short": "-u", "description": "Database connection URL to inspect", "type": "string"},
|
|
14
|
+
{"name": "--schema", "description": "List of schema names to inspect (comma-separated)", "type": "string"},
|
|
15
|
+
{"name": "--format", "description": "Output format: atlas (HCL), sql, or json", "type": "string"},
|
|
16
|
+
{"name": "--env", "description": "Environment from atlas.hcl config file", "type": "string"},
|
|
17
|
+
{"name": "--dev-url", "description": "Dev database URL for normalization", "type": "string"},
|
|
18
|
+
{"name": "--log", "description": "Log format template", "type": "string"},
|
|
19
|
+
{"name": "--exclude", "description": "List of glob patterns to exclude from inspection", "type": "string"},
|
|
20
|
+
{"name": "--config", "description": "Path to atlas configuration file", "type": "string"},
|
|
21
|
+
{"name": "--var", "description": "Input variable for atlas.hcl", "type": "string"}
|
|
22
|
+
],
|
|
23
|
+
"examples": [
|
|
24
|
+
"atlas schema inspect --url 'postgres://user:pass@localhost:5432/mydb?sslmode=disable'",
|
|
25
|
+
"atlas schema inspect --url 'mysql://root:pass@localhost:3306/mydb'",
|
|
26
|
+
"atlas schema inspect --url 'sqlite://file.db'",
|
|
27
|
+
"atlas schema inspect --url 'postgres://localhost/mydb' --format '{{ sql . }}'",
|
|
28
|
+
"atlas schema inspect --url 'postgres://localhost/mydb' --schema public --format json",
|
|
29
|
+
"atlas schema inspect --env local",
|
|
30
|
+
"atlas schema inspect --url 'postgres://localhost/mydb' --exclude 'internal_*'"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "schema apply",
|
|
35
|
+
"description": "Apply a desired schema state to a target database. Compares the desired state with the current database and generates/applies the necessary changes.",
|
|
36
|
+
"args": [],
|
|
37
|
+
"options": [
|
|
38
|
+
{"name": "--url", "short": "-u", "description": "Target database connection URL", "type": "string"},
|
|
39
|
+
{"name": "--to", "description": "Desired schema state: URL, HCL file, or migration directory", "type": "string"},
|
|
40
|
+
{"name": "--dev-url", "description": "Dev database URL for computing the diff", "type": "string"},
|
|
41
|
+
{"name": "--schema", "description": "Schemas to apply changes to", "type": "string"},
|
|
42
|
+
{"name": "--dry-run", "description": "Print SQL statements without executing them"},
|
|
43
|
+
{"name": "--auto-approve", "description": "Apply changes without interactive approval"},
|
|
44
|
+
{"name": "--env", "description": "Environment from atlas.hcl config", "type": "string"},
|
|
45
|
+
{"name": "--config", "description": "Path to atlas configuration file", "type": "string"},
|
|
46
|
+
{"name": "--var", "description": "Input variable for atlas.hcl", "type": "string"},
|
|
47
|
+
{"name": "--tx-mode", "description": "Transaction mode: file, all, or none", "type": "string"},
|
|
48
|
+
{"name": "--exclude", "description": "Glob patterns to exclude from diff", "type": "string"},
|
|
49
|
+
{"name": "--log", "description": "Log format template", "type": "string"}
|
|
50
|
+
],
|
|
51
|
+
"examples": [
|
|
52
|
+
"atlas schema apply --url 'postgres://user:pass@localhost:5432/mydb' --to file://schema.hcl --dev-url 'docker://postgres/15'",
|
|
53
|
+
"atlas schema apply --url 'mysql://root:pass@localhost:3306/mydb' --to file://schema.sql --dev-url 'docker://mysql/8'",
|
|
54
|
+
"atlas schema apply --env production --dry-run",
|
|
55
|
+
"atlas schema apply --url 'sqlite://file.db' --to file://desired.hcl --auto-approve",
|
|
56
|
+
"atlas schema apply --env local --auto-approve --tx-mode=all"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "schema diff",
|
|
61
|
+
"description": "Calculate the diff between two schemas and output the SQL statements needed to migrate from one to the other.",
|
|
62
|
+
"args": [],
|
|
63
|
+
"options": [
|
|
64
|
+
{"name": "--from", "description": "Source schema URL or file", "type": "string"},
|
|
65
|
+
{"name": "--to", "description": "Target schema URL or file", "type": "string"},
|
|
66
|
+
{"name": "--dev-url", "description": "Dev database URL for computing the diff", "type": "string"},
|
|
67
|
+
{"name": "--format", "description": "Output format for the diff", "type": "string"},
|
|
68
|
+
{"name": "--env", "description": "Environment from atlas.hcl config", "type": "string"},
|
|
69
|
+
{"name": "--schema", "description": "Schemas to include in diff", "type": "string"},
|
|
70
|
+
{"name": "--exclude", "description": "Glob patterns to exclude", "type": "string"},
|
|
71
|
+
{"name": "--config", "description": "Path to atlas config file", "type": "string"},
|
|
72
|
+
{"name": "--var", "description": "Input variable for atlas.hcl", "type": "string"}
|
|
73
|
+
],
|
|
74
|
+
"examples": [
|
|
75
|
+
"atlas schema diff --from 'postgres://localhost/dev' --to 'postgres://localhost/prod'",
|
|
76
|
+
"atlas schema diff --from file://old.hcl --to file://new.hcl --dev-url 'docker://postgres/15'",
|
|
77
|
+
"atlas schema diff --from 'mysql://root@localhost/db1' --to 'mysql://root@localhost/db2'",
|
|
78
|
+
"atlas schema diff --env local --to file://schema.hcl"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "schema clean",
|
|
83
|
+
"description": "Remove all objects from the target database schema. WARNING: Destructive operation.",
|
|
84
|
+
"args": [],
|
|
85
|
+
"options": [
|
|
86
|
+
{"name": "--url", "short": "-u", "description": "Database connection URL", "type": "string"},
|
|
87
|
+
{"name": "--schema", "description": "Schemas to clean", "type": "string"},
|
|
88
|
+
{"name": "--auto-approve", "description": "Skip confirmation prompt"},
|
|
89
|
+
{"name": "--env", "description": "Environment from config", "type": "string"}
|
|
90
|
+
],
|
|
91
|
+
"examples": [
|
|
92
|
+
"atlas schema clean --url 'postgres://localhost/testdb' --auto-approve",
|
|
93
|
+
"atlas schema clean --env staging"
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "schema fmt",
|
|
98
|
+
"description": "Format Atlas HCL schema files to a canonical style, similar to gofmt or terraform fmt.",
|
|
99
|
+
"args": [
|
|
100
|
+
{"name": "paths", "type": "string", "required": false, "description": "Paths to HCL files or directories to format (default: current directory)"}
|
|
101
|
+
],
|
|
102
|
+
"options": [],
|
|
103
|
+
"examples": [
|
|
104
|
+
"atlas schema fmt",
|
|
105
|
+
"atlas schema fmt schema.hcl",
|
|
106
|
+
"atlas schema fmt ./schemas/"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "migrate diff",
|
|
111
|
+
"description": "Generate a new versioned migration file by computing the diff between the desired schema and the current migration directory state.",
|
|
112
|
+
"args": [
|
|
113
|
+
{"name": "name", "type": "string", "required": false, "description": "Optional name suffix for the migration file"}
|
|
114
|
+
],
|
|
115
|
+
"options": [
|
|
116
|
+
{"name": "--to", "description": "Desired schema state: URL, HCL file, or directory", "type": "string"},
|
|
117
|
+
{"name": "--dev-url", "description": "Dev database URL for computing the diff", "type": "string"},
|
|
118
|
+
{"name": "--dir", "description": "Migration directory URL (default: file://migrations)", "type": "string"},
|
|
119
|
+
{"name": "--format", "description": "Format for the migration file (atlas or golang-migrate, goose, flyway, liquibase, dbmate)", "type": "string"},
|
|
120
|
+
{"name": "--env", "description": "Environment from atlas.hcl config", "type": "string"},
|
|
121
|
+
{"name": "--config", "description": "Path to atlas config file", "type": "string"},
|
|
122
|
+
{"name": "--var", "description": "Input variable for atlas.hcl", "type": "string"},
|
|
123
|
+
{"name": "--schema", "description": "Schemas to diff", "type": "string"},
|
|
124
|
+
{"name": "--lock-timeout", "description": "Timeout for acquiring schema lock", "type": "string"},
|
|
125
|
+
{"name": "--qualifier", "description": "Schema qualifier for migration statements", "type": "string"},
|
|
126
|
+
{"name": "--edit", "description": "Open the generated migration file in an editor"}
|
|
127
|
+
],
|
|
128
|
+
"examples": [
|
|
129
|
+
"atlas migrate diff add_users --to file://schema.hcl --dev-url 'docker://postgres/15'",
|
|
130
|
+
"atlas migrate diff --to file://schema.sql --dev-url 'docker://mysql/8' --dir file://migrations",
|
|
131
|
+
"atlas migrate diff create_orders --env local",
|
|
132
|
+
"atlas migrate diff --to 'postgres://localhost/mydb' --dev-url 'docker://postgres/15' --format golang-migrate",
|
|
133
|
+
"atlas migrate diff add_index --env dev --edit"
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "migrate apply",
|
|
138
|
+
"description": "Apply pending migration files to a database. Reads the migration directory and executes unapplied files in order.",
|
|
139
|
+
"args": [
|
|
140
|
+
{"name": "count", "type": "string", "required": false, "description": "Number of migrations to apply (default: all pending)"}
|
|
141
|
+
],
|
|
142
|
+
"options": [
|
|
143
|
+
{"name": "--url", "short": "-u", "description": "Target database connection URL", "type": "string"},
|
|
144
|
+
{"name": "--dir", "description": "Migration directory URL", "type": "string"},
|
|
145
|
+
{"name": "--dry-run", "description": "Print planned SQL without executing"},
|
|
146
|
+
{"name": "--env", "description": "Environment from config", "type": "string"},
|
|
147
|
+
{"name": "--config", "description": "Path to atlas config file", "type": "string"},
|
|
148
|
+
{"name": "--var", "description": "Input variable for atlas.hcl", "type": "string"},
|
|
149
|
+
{"name": "--baseline", "description": "Version to set as baseline (skip migrations up to this version)", "type": "string"},
|
|
150
|
+
{"name": "--tx-mode", "description": "Transaction mode: file, all, or none", "type": "string"},
|
|
151
|
+
{"name": "--revisions-schema", "description": "Schema for the revisions tracking table", "type": "string"},
|
|
152
|
+
{"name": "--allow-dirty", "description": "Allow applying on a database with a dirty migration state"},
|
|
153
|
+
{"name": "--log", "description": "Log format template", "type": "string"}
|
|
154
|
+
],
|
|
155
|
+
"examples": [
|
|
156
|
+
"atlas migrate apply --url 'postgres://user:pass@localhost:5432/mydb'",
|
|
157
|
+
"atlas migrate apply --url 'mysql://root:pass@localhost:3306/mydb' --dir file://migrations",
|
|
158
|
+
"atlas migrate apply 1 --url 'postgres://localhost/mydb'",
|
|
159
|
+
"atlas migrate apply --env production",
|
|
160
|
+
"atlas migrate apply --url 'postgres://localhost/mydb' --dry-run",
|
|
161
|
+
"atlas migrate apply --url 'postgres://localhost/mydb' --baseline 20240101000000",
|
|
162
|
+
"atlas migrate apply --url 'postgres://localhost/mydb' --tx-mode=all"
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "migrate hash",
|
|
167
|
+
"description": "Recalculate and update the integrity hash file (atlas.sum) for the migration directory. Required after manually editing migration files.",
|
|
168
|
+
"args": [],
|
|
169
|
+
"options": [
|
|
170
|
+
{"name": "--dir", "description": "Migration directory URL", "type": "string"},
|
|
171
|
+
{"name": "--env", "description": "Environment from config", "type": "string"},
|
|
172
|
+
{"name": "--config", "description": "Path to atlas config file", "type": "string"}
|
|
173
|
+
],
|
|
174
|
+
"examples": [
|
|
175
|
+
"atlas migrate hash",
|
|
176
|
+
"atlas migrate hash --dir file://migrations",
|
|
177
|
+
"atlas migrate hash --env local"
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"name": "migrate lint",
|
|
182
|
+
"description": "Analyze migration files for potential issues, destructive changes, and best-practice violations. Integrates with CI/CD pipelines.",
|
|
183
|
+
"args": [],
|
|
184
|
+
"options": [
|
|
185
|
+
{"name": "--dir", "description": "Migration directory URL", "type": "string"},
|
|
186
|
+
{"name": "--dev-url", "description": "Dev database URL for analysis", "type": "string"},
|
|
187
|
+
{"name": "--latest", "description": "Number of latest migration files to analyze", "type": "string"},
|
|
188
|
+
{"name": "--git-base", "description": "Git base branch for diff analysis", "type": "string"},
|
|
189
|
+
{"name": "--git-dir", "description": "Git repository root", "type": "string"},
|
|
190
|
+
{"name": "--env", "description": "Environment from config", "type": "string"},
|
|
191
|
+
{"name": "--config", "description": "Path to atlas config file", "type": "string"},
|
|
192
|
+
{"name": "--log", "description": "Log format template", "type": "string"},
|
|
193
|
+
{"name": "--format", "description": "Output format for lint results", "type": "string"},
|
|
194
|
+
{"name": "--var", "description": "Input variable for atlas.hcl", "type": "string"}
|
|
195
|
+
],
|
|
196
|
+
"examples": [
|
|
197
|
+
"atlas migrate lint --dev-url 'docker://postgres/15' --latest 1",
|
|
198
|
+
"atlas migrate lint --dev-url 'docker://mysql/8' --git-base main",
|
|
199
|
+
"atlas migrate lint --env ci --latest 5",
|
|
200
|
+
"atlas migrate lint --dev-url 'docker://postgres/15' --dir file://migrations --format '{{ json . }}'"
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"name": "migrate status",
|
|
205
|
+
"description": "Show the status of all migrations: which have been applied, which are pending, and detect any issues.",
|
|
206
|
+
"args": [],
|
|
207
|
+
"options": [
|
|
208
|
+
{"name": "--url", "short": "-u", "description": "Database connection URL", "type": "string"},
|
|
209
|
+
{"name": "--dir", "description": "Migration directory URL", "type": "string"},
|
|
210
|
+
{"name": "--env", "description": "Environment from config", "type": "string"},
|
|
211
|
+
{"name": "--config", "description": "Path to atlas config file", "type": "string"},
|
|
212
|
+
{"name": "--revisions-schema", "description": "Schema for the revisions table", "type": "string"},
|
|
213
|
+
{"name": "--log", "description": "Log format template", "type": "string"},
|
|
214
|
+
{"name": "--var", "description": "Input variable for atlas.hcl", "type": "string"}
|
|
215
|
+
],
|
|
216
|
+
"examples": [
|
|
217
|
+
"atlas migrate status --url 'postgres://user:pass@localhost:5432/mydb'",
|
|
218
|
+
"atlas migrate status --env production",
|
|
219
|
+
"atlas migrate status --url 'mysql://root@localhost/mydb' --dir file://migrations"
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"name": "migrate new",
|
|
224
|
+
"description": "Create a new empty migration file in the migration directory with proper formatting and hash updates.",
|
|
225
|
+
"args": [
|
|
226
|
+
{"name": "name", "type": "string", "required": false, "description": "Name for the migration file"}
|
|
227
|
+
],
|
|
228
|
+
"options": [
|
|
229
|
+
{"name": "--dir", "description": "Migration directory URL", "type": "string"},
|
|
230
|
+
{"name": "--env", "description": "Environment from config", "type": "string"},
|
|
231
|
+
{"name": "--config", "description": "Path to atlas config file", "type": "string"},
|
|
232
|
+
{"name": "--edit", "description": "Open the new migration file in an editor"}
|
|
233
|
+
],
|
|
234
|
+
"examples": [
|
|
235
|
+
"atlas migrate new add_users_table",
|
|
236
|
+
"atlas migrate new --dir file://migrations",
|
|
237
|
+
"atlas migrate new create_orders --env local --edit"
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"name": "migrate import",
|
|
242
|
+
"description": "Import migration files from another migration tool format (golang-migrate, goose, flyway, liquibase, dbmate) into Atlas format.",
|
|
243
|
+
"args": [],
|
|
244
|
+
"options": [
|
|
245
|
+
{"name": "--from", "description": "Source migration directory URL with format qualifier", "type": "string"},
|
|
246
|
+
{"name": "--dir", "description": "Target Atlas migration directory", "type": "string"},
|
|
247
|
+
{"name": "--env", "description": "Environment from config", "type": "string"}
|
|
248
|
+
],
|
|
249
|
+
"examples": [
|
|
250
|
+
"atlas migrate import --from 'file://migrations?format=golang-migrate'",
|
|
251
|
+
"atlas migrate import --from 'file://db/migrations?format=goose'",
|
|
252
|
+
"atlas migrate import --from 'file://migrations?format=flyway' --dir file://atlas-migrations"
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"name": "migrate set",
|
|
257
|
+
"description": "Set the current migration version in the revisions table without applying any migrations. Similar to alembic stamp.",
|
|
258
|
+
"args": [
|
|
259
|
+
{"name": "version", "type": "string", "required": true, "description": "Migration version to set"}
|
|
260
|
+
],
|
|
261
|
+
"options": [
|
|
262
|
+
{"name": "--url", "short": "-u", "description": "Database connection URL", "type": "string"},
|
|
263
|
+
{"name": "--dir", "description": "Migration directory URL", "type": "string"},
|
|
264
|
+
{"name": "--env", "description": "Environment from config", "type": "string"},
|
|
265
|
+
{"name": "--revisions-schema", "description": "Schema for the revisions table", "type": "string"}
|
|
266
|
+
],
|
|
267
|
+
"examples": [
|
|
268
|
+
"atlas migrate set 20240101000000 --url 'postgres://localhost/mydb'",
|
|
269
|
+
"atlas migrate set 20240301120000 --env production"
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"name": "migrate down",
|
|
274
|
+
"description": "Revert applied migration files from the database. Requires down migration files or uses Atlas planned rollbacks.",
|
|
275
|
+
"args": [
|
|
276
|
+
{"name": "count", "type": "string", "required": false, "description": "Number of migrations to roll back (default: 1)"}
|
|
277
|
+
],
|
|
278
|
+
"options": [
|
|
279
|
+
{"name": "--url", "short": "-u", "description": "Database connection URL", "type": "string"},
|
|
280
|
+
{"name": "--dir", "description": "Migration directory URL", "type": "string"},
|
|
281
|
+
{"name": "--dev-url", "description": "Dev database URL for rollback planning", "type": "string"},
|
|
282
|
+
{"name": "--env", "description": "Environment from config", "type": "string"},
|
|
283
|
+
{"name": "--config", "description": "Path to atlas config file", "type": "string"},
|
|
284
|
+
{"name": "--log", "description": "Log format template", "type": "string"},
|
|
285
|
+
{"name": "--to-version", "description": "Target version to roll back to", "type": "string"},
|
|
286
|
+
{"name": "--to-tag", "description": "Target tag to roll back to", "type": "string"}
|
|
287
|
+
],
|
|
288
|
+
"examples": [
|
|
289
|
+
"atlas migrate down --url 'postgres://localhost/mydb' --dev-url 'docker://postgres/15'",
|
|
290
|
+
"atlas migrate down 2 --url 'postgres://localhost/mydb' --dev-url 'docker://postgres/15'",
|
|
291
|
+
"atlas migrate down --env local --to-version 20240101000000"
|
|
292
|
+
]
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"name": "migrate checkpoint",
|
|
296
|
+
"description": "Create a checkpoint migration that represents the cumulative state of all previous migrations, allowing cleanup of old migration files.",
|
|
297
|
+
"args": [
|
|
298
|
+
{"name": "name", "type": "string", "required": false, "description": "Name for the checkpoint migration"}
|
|
299
|
+
],
|
|
300
|
+
"options": [
|
|
301
|
+
{"name": "--dev-url", "description": "Dev database URL", "type": "string"},
|
|
302
|
+
{"name": "--dir", "description": "Migration directory URL", "type": "string"},
|
|
303
|
+
{"name": "--env", "description": "Environment from config", "type": "string"},
|
|
304
|
+
{"name": "--config", "description": "Path to atlas config file", "type": "string"},
|
|
305
|
+
{"name": "--var", "description": "Input variable for atlas.hcl", "type": "string"}
|
|
306
|
+
],
|
|
307
|
+
"examples": [
|
|
308
|
+
"atlas migrate checkpoint --dev-url 'docker://postgres/15'",
|
|
309
|
+
"atlas migrate checkpoint my_checkpoint --env local"
|
|
310
|
+
]
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"name": "migrate push",
|
|
314
|
+
"description": "Push the migration directory to Atlas Cloud for versioned schema management, CI/CD integration, and team collaboration.",
|
|
315
|
+
"args": [
|
|
316
|
+
{"name": "name", "type": "string", "required": true, "description": "Name/tag for the migration directory in Atlas Cloud"}
|
|
317
|
+
],
|
|
318
|
+
"options": [
|
|
319
|
+
{"name": "--dir", "description": "Local migration directory to push", "type": "string"},
|
|
320
|
+
{"name": "--dev-url", "description": "Dev database URL for validation", "type": "string"},
|
|
321
|
+
{"name": "--env", "description": "Environment from config", "type": "string"},
|
|
322
|
+
{"name": "--config", "description": "Path to atlas config file", "type": "string"},
|
|
323
|
+
{"name": "--tag", "description": "Tag for the pushed version", "type": "string"},
|
|
324
|
+
{"name": "--var", "description": "Input variable for atlas.hcl", "type": "string"}
|
|
325
|
+
],
|
|
326
|
+
"examples": [
|
|
327
|
+
"atlas migrate push myapp --dev-url 'docker://postgres/15'",
|
|
328
|
+
"atlas migrate push myapp --tag v1.0 --env production"
|
|
329
|
+
]
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"name": "migrate validate",
|
|
333
|
+
"description": "Validate the integrity and correctness of the migration directory, checking hash consistency and file ordering.",
|
|
334
|
+
"args": [],
|
|
335
|
+
"options": [
|
|
336
|
+
{"name": "--dir", "description": "Migration directory URL", "type": "string"},
|
|
337
|
+
{"name": "--dev-url", "description": "Dev database URL for validation", "type": "string"},
|
|
338
|
+
{"name": "--env", "description": "Environment from config", "type": "string"},
|
|
339
|
+
{"name": "--config", "description": "Path to atlas config file", "type": "string"}
|
|
340
|
+
],
|
|
341
|
+
"examples": [
|
|
342
|
+
"atlas migrate validate",
|
|
343
|
+
"atlas migrate validate --dev-url 'docker://postgres/15'",
|
|
344
|
+
"atlas migrate validate --env local"
|
|
345
|
+
]
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"name": "migrate rebase",
|
|
349
|
+
"description": "Squash and rebase migration files from a specific version, combining them into a single migration for cleaner history.",
|
|
350
|
+
"args": [],
|
|
351
|
+
"options": [
|
|
352
|
+
{"name": "--dir", "description": "Migration directory URL", "type": "string"},
|
|
353
|
+
{"name": "--dev-url", "description": "Dev database URL", "type": "string"},
|
|
354
|
+
{"name": "--env", "description": "Environment from config", "type": "string"},
|
|
355
|
+
{"name": "--config", "description": "Path to atlas config file", "type": "string"}
|
|
356
|
+
],
|
|
357
|
+
"examples": [
|
|
358
|
+
"atlas migrate rebase --dev-url 'docker://postgres/15'",
|
|
359
|
+
"atlas migrate rebase --env local"
|
|
360
|
+
]
|
|
361
|
+
}
|
|
362
|
+
],
|
|
363
|
+
"globalOptions": [
|
|
364
|
+
{"name": "--help", "short": "-h", "description": "Show help information"},
|
|
365
|
+
{"name": "--version", "description": "Show Atlas version"},
|
|
366
|
+
{"name": "--config", "description": "Path to atlas configuration file (atlas.hcl)", "type": "string"},
|
|
367
|
+
{"name": "--env", "description": "Environment to use from config file", "type": "string"},
|
|
368
|
+
{"name": "--var", "description": "Input variables for atlas.hcl (key=value format)", "type": "string"}
|
|
369
|
+
],
|
|
370
|
+
"examples": [
|
|
371
|
+
"atlas schema inspect --url 'postgres://localhost/mydb'",
|
|
372
|
+
"atlas schema apply --url 'postgres://localhost/mydb' --to file://schema.hcl --dev-url 'docker://postgres/15'",
|
|
373
|
+
"atlas schema diff --from 'postgres://localhost/dev' --to 'postgres://localhost/staging'",
|
|
374
|
+
"atlas migrate diff add_users --to file://schema.hcl --dev-url 'docker://postgres/15'",
|
|
375
|
+
"atlas migrate apply --url 'postgres://localhost/mydb'",
|
|
376
|
+
"atlas migrate status --url 'postgres://localhost/mydb'",
|
|
377
|
+
"atlas migrate lint --dev-url 'docker://postgres/15' --latest 1",
|
|
378
|
+
"atlas migrate hash",
|
|
379
|
+
"atlas migrate new create_orders",
|
|
380
|
+
"atlas migrate down --url 'postgres://localhost/mydb' --dev-url 'docker://postgres/15'",
|
|
381
|
+
"atlas migrate validate --dev-url 'docker://postgres/15'",
|
|
382
|
+
"atlas migrate checkpoint --dev-url 'docker://postgres/15'",
|
|
383
|
+
"atlas schema fmt",
|
|
384
|
+
"atlas migrate push myapp --dev-url 'docker://postgres/15' --tag latest"
|
|
385
|
+
],
|
|
386
|
+
"relatedCommands": ["flyway", "liquibase", "prisma", "alembic", "dbmate"],
|
|
387
|
+
"contextEngine": {
|
|
388
|
+
"detectors": [
|
|
389
|
+
{
|
|
390
|
+
"name": "atlas_config_detect",
|
|
391
|
+
"description": "Detect Atlas configuration file (atlas.hcl)",
|
|
392
|
+
"command": "find . -maxdepth 2 -name 'atlas.hcl' -type f 2>/dev/null | head -3",
|
|
393
|
+
"parser": "lines",
|
|
394
|
+
"cacheFor": 60
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"name": "atlas_schema_detect",
|
|
398
|
+
"description": "Detect Atlas HCL schema files",
|
|
399
|
+
"command": "find . -maxdepth 3 -name 'schema.hcl' -o -name '*.hcl' -path '*/schema/*' 2>/dev/null | head -10",
|
|
400
|
+
"parser": "lines",
|
|
401
|
+
"cacheFor": 60
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"name": "atlas_migrations_detect",
|
|
405
|
+
"description": "Detect Atlas migration files and atlas.sum",
|
|
406
|
+
"command": "find . -name 'atlas.sum' -o -path '*/migrations/*.sql' 2>/dev/null | head -10",
|
|
407
|
+
"parser": "lines",
|
|
408
|
+
"cacheFor": 30
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"name": "atlas_version",
|
|
412
|
+
"description": "Get installed Atlas version",
|
|
413
|
+
"command": "atlas version 2>/dev/null || echo 'not installed'",
|
|
414
|
+
"parser": "lines",
|
|
415
|
+
"cacheFor": 120
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"name": "atlas_env_detect",
|
|
419
|
+
"description": "Detect configured Atlas environments",
|
|
420
|
+
"command": "grep -E '^env\\s' atlas.hcl 2>/dev/null | head -5 || echo 'no config'",
|
|
421
|
+
"parser": "lines",
|
|
422
|
+
"cacheFor": 60
|
|
423
|
+
}
|
|
424
|
+
]
|
|
425
|
+
}
|
|
426
|
+
}
|