|
19 | 19 | maxAge bigint not null, |
20 | 20 | maxSize bigint not null, |
21 | 21 | metadata jsonb, |
22 | | - name varchar(255), |
| 22 | + name text check (char_length(name) < 64), |
23 | 23 | remoteId bigint not null, |
24 | 24 | startTime bigint not null, |
25 | 25 | state smallint check (state between 0 and 4), |
|
40 | 40 | create table DiscoveryNode ( |
41 | 41 | id bigint not null, |
42 | 42 | labels jsonb, |
43 | | - name varchar(255) not null, |
44 | | - nodeType varchar(255) not null, |
| 43 | + name text not null check (char_length(name) < 255), |
| 44 | + nodeType text not null check (char_length(nodeType) < 255), |
45 | 45 | parentNode bigint, |
46 | 46 | primary key (id) |
47 | 47 | ); |
48 | 48 |
|
49 | 49 | create table DiscoveryPlugin ( |
50 | 50 | id uuid not null, |
51 | 51 | builtin boolean not null, |
52 | | - callback varchar(255) unique, |
| 52 | + callback text unique, |
53 | 53 | credential_id bigint unique, |
54 | 54 | realm_id bigint not null unique, |
55 | 55 | primary key (id) |
56 | 56 | ); |
57 | 57 |
|
58 | 58 | create table MatchExpression ( |
59 | 59 | id bigint not null, |
60 | | - script varchar(255) not null, |
| 60 | + script text not null check (char_length(script) < 1024), |
61 | 61 | primary key (id) |
62 | 62 | ); |
63 | 63 |
|
64 | 64 | create table Rule ( |
65 | 65 | id bigint not null, |
66 | 66 | archivalPeriodSeconds integer not null, |
67 | | - description varchar(255), |
| 67 | + description text check (char_length(description) < 1024), |
68 | 68 | enabled boolean not null, |
69 | | - eventSpecifier varchar(255) not null, |
| 69 | + eventSpecifier text not null check (char_length(eventSpecifier) < 255), |
70 | 70 | initialDelaySeconds integer not null, |
71 | 71 | maxAgeSeconds integer not null, |
72 | 72 | maxSizeBytes integer not null, |
73 | | - name varchar(255) unique, |
| 73 | + name text unique check (char_length(name) < 255), |
74 | 74 | preservedArchives integer not null, |
75 | 75 | matchExpression bigint unique, |
76 | 76 | primary key (id) |
77 | 77 | ); |
78 | 78 |
|
79 | 79 | create table Target ( |
80 | 80 | id bigint not null, |
81 | | - alias varchar(255), |
| 81 | + alias text check (char_length(alias) < 255), |
82 | 82 | annotations jsonb, |
83 | 83 | connectUrl bytea unique, |
84 | | - jvmId varchar(255), |
| 84 | + jvmId text check (char_length(jvmId) < 255), |
85 | 85 | labels jsonb, |
86 | 86 | discoveryNode bigint unique, |
87 | 87 | primary key (id) |
|
0 commit comments