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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
apply 1.hcl
# test deprecated -d flag
atlas schema inspect -d URL > inspected.hcl
cmp inspected.hcl 1.hcl
# test url flag
atlas schema inspect -u URL > inspected.hcl
cmp inspected.hcl 1.hcl
# test exclude flag on schema.
atlas schema inspect -u URL --exclude "main" > inspected.hcl
cmp inspected.hcl empty.hcl
# test exclude flag on table.
atlas schema inspect -u URL --exclude "*.users" > inspected.hcl
cmp inspected.hcl notable.hcl
# test exclude flag on column.
atlas schema inspect -u URL --exclude "main.*.[ab]*" > inspected.hcl
cmp inspected.hcl id.hcl
# test exclude flag on column.
atlas schema inspect -u URL --exclude "*.*.*" > inspected.hcl
cmp inspected.hcl nocolumn.hcl
-- 1.hcl --
table "users" {
schema = schema.main
column "id" {
null = false
type = int
}
column "a" {
null = false
type = int
}
column "b" {
null = false
type = int
}
column "ab" {
null = false
type = int
}
}
schema "main" {
}
-- empty.hcl --
-- notable.hcl --
schema "main" {
}
-- id.hcl --
table "users" {
schema = schema.main
column "id" {
null = false
type = int
}
}
schema "main" {
}
-- nocolumn.hcl --
table "users" {
schema = schema.main
}
schema "main" {
}
|