File: cli-project-schemas.txt

package info (click to toggle)
golang-ariga-atlas 0.7.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 5,676 kB
  • sloc: javascript: 592; sql: 404; makefile: 10
file content (29 lines) | stat: -rw-r--r-- 558 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
atlas schema apply --env local --auto-approve > out.txt
exec cat out.txt
stdout 'CREATE TABLE `script_cli_project_schemas`'

-- 1.hcl --
schema "script_cli_project_schemas" {
}
table "users" {
   schema = schema.script_cli_project_schemas
   column "id" {
     type = bigint
     null = false
   }
}
-- atlas.hcl --
env "local" {
    url = "URL"
    src = "./1.hcl"
    schemas = ["script_cli_project_schemas"]
}
-- expected.sql --
CREATE TABLE `users` (
  `id` bigint NOT NULL
)
-- 0.hcl --
schema "$db" {
    charset = "$charset"
    collate = "$collate"
}