File: column-bit.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 (25 lines) | stat: -rw-r--r-- 312 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
apply 1.hcl
cmpshow t 1.sql

-- 1.hcl --
schema "$db" {}

table "t" {
  schema = schema.$db
  column "c1" {
    type = bit
  }
  column "c2" {
    type = bit(1)
  }
  column "c3" {
    type = bit(64)
  }
}

-- 1.sql --
CREATE TABLE `t` (
  `c1` bit(1) NOT NULL,
  `c2` bit(1) NOT NULL,
  `c3` bit(64) NOT NULL
)