Skip to content

Commit

Permalink
Expand column size limits across tables
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoxhaa committed Dec 17, 2024
1 parent 58088fd commit fc6722f
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions schema/mysql/schema.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CREATE TABLE cluster (
uuid binary(16) NOT NULL,
name varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (uuid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

Expand All @@ -19,7 +19,7 @@ CREATE TABLE resource_annotation (

CREATE TABLE label (
uuid binary(16) NOT NULL,
name varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
value varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (uuid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
Expand All @@ -33,7 +33,7 @@ CREATE TABLE resource_label (
CREATE TABLE config_map (
uuid binary(16) NOT NULL,
cluster_uuid binary(16) NOT NULL,
namespace varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
namespace varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(253) COLLATE utf8mb4_unicode_ci NOT NULL,
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
resource_version varchar(255) NOT NULL,
Expand All @@ -57,7 +57,7 @@ CREATE TABLE config_map_label (
CREATE TABLE container (
uuid binary(16) NOT NULL,
pod_uuid binary(16) NOT NULL,
name varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
image varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
image_pull_policy enum('Always', 'Never', 'IfNotPresent') COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
cpu_limits bigint unsigned NULL DEFAULT NULL,
Expand All @@ -77,7 +77,7 @@ CREATE TABLE container (
CREATE TABLE init_container (
uuid binary(16) NOT NULL,
pod_uuid binary(16) NOT NULL,
name varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
image varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
image_pull_policy enum('Always', 'Never', 'IfNotPresent') COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
cpu_limits bigint unsigned NULL DEFAULT NULL,
Expand All @@ -94,7 +94,7 @@ CREATE TABLE init_container (
CREATE TABLE sidecar_container (
uuid binary(16) NOT NULL,
pod_uuid binary(16) NOT NULL,
name varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
image varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
image_pull_policy enum('Always', 'Never', 'IfNotPresent') COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
cpu_limits bigint unsigned NULL DEFAULT NULL,
Expand Down Expand Up @@ -130,7 +130,7 @@ CREATE TABLE container_log (
CREATE TABLE container_mount (
container_uuid binary(16) NOT NULL,
pod_uuid binary(16) NOT NULL,
volume_name varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
volume_name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
path varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
sub_path varchar(255) COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
read_only enum('n', 'y') COLLATE utf8mb4_unicode_ci NOT NULL,
Expand All @@ -140,8 +140,8 @@ CREATE TABLE container_mount (
CREATE TABLE cron_job (
uuid binary(16) NOT NULL,
cluster_uuid binary(16) NOT NULL,
namespace varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
namespace varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
resource_version varchar(255) NOT NULL,
schedule varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
Expand Down Expand Up @@ -174,7 +174,7 @@ CREATE TABLE cron_job_label (
CREATE TABLE daemon_set (
uuid binary(16) NOT NULL,
cluster_uuid binary(16) NOT NULL,
namespace varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
namespace varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(253) COLLATE utf8mb4_unicode_ci NOT NULL,
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
resource_version varchar(255) NOT NULL,
Expand Down Expand Up @@ -230,7 +230,7 @@ CREATE TABLE daemon_set_owner (
CREATE TABLE deployment (
uuid binary(16) NOT NULL,
cluster_uuid binary(16) NOT NULL,
namespace varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
namespace varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(253) COLLATE utf8mb4_unicode_ci NOT NULL,
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
resource_version varchar(255) NOT NULL,
Expand Down Expand Up @@ -304,7 +304,7 @@ CREATE TABLE endpoint (
CREATE TABLE endpoint_slice (
uuid binary(16) NOT NULL,
cluster_uuid binary(16) NOT NULL,
namespace varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
namespace varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(253) COLLATE utf8mb4_unicode_ci NOT NULL,
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
resource_version varchar(255) NOT NULL,
Expand All @@ -322,7 +322,7 @@ CREATE TABLE endpoint_slice_label (
CREATE TABLE endpoint_target_ref (
endpoint_slice_uuid binary(16) NOT NULL,
kind enum('pod', 'node') COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
namespace varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
namespace varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
api_version varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
Expand All @@ -334,7 +334,7 @@ CREATE TABLE event (
uuid binary(16) NOT NULL,
cluster_uuid binary(16) NOT NULL,
reference_uuid binary(16) NOT NULL,
namespace varchar(63) NOT NULL,
namespace varchar(255) NOT NULL,
name varchar(270) NOT NULL,
uid varchar(255) NOT NULL,
resource_version varchar(255) NOT NULL,
Expand All @@ -345,7 +345,7 @@ CREATE TABLE event (
note text NOT NULL,
type varchar(255) NOT NULL,
reference_kind varchar(255) NOT NULL,
reference_namespace varchar(63) NULL DEFAULT NULL,
reference_namespace varchar(255) NULL DEFAULT NULL,
reference_name varchar(253) NOT NULL,
first_seen bigint unsigned NOT NULL,
last_seen bigint unsigned NOT NULL,
Expand All @@ -358,8 +358,8 @@ CREATE TABLE event (
CREATE TABLE ingress (
uuid binary(16) NOT NULL,
cluster_uuid binary(16) NOT NULL,
namespace varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
namespace varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
resource_version varchar(255) NOT NULL,
yaml mediumblob DEFAULT NULL,
Expand Down Expand Up @@ -419,8 +419,8 @@ CREATE TABLE ingress_tls (
CREATE TABLE job (
uuid binary(16) NOT NULL,
cluster_uuid binary(16) NOT NULL,
namespace varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
namespace varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
resource_version varchar(255) NOT NULL,
parallelism int unsigned NULL DEFAULT NULL,
Expand Down Expand Up @@ -479,8 +479,8 @@ CREATE TABLE job_owner (
CREATE TABLE namespace (
uuid binary(16) NOT NULL,
cluster_uuid binary(16) NOT NULL,
namespace varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL, /* TODO: Remove. A namespace does not have a namespace. */
name varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
namespace varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, /* TODO: Remove. A namespace does not have a namespace. */
name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
resource_version varchar(255) NOT NULL,
phase enum('Active', 'Terminating') COLLATE utf8mb4_unicode_ci NOT NULL,
Expand Down Expand Up @@ -514,7 +514,7 @@ CREATE TABLE namespace_label (
CREATE TABLE node (
uuid binary(16) NOT NULL,
cluster_uuid binary(16) NOT NULL,
namespace varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
namespace varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(253) COLLATE utf8mb4_unicode_ci NOT NULL,
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
resource_version varchar(255) NOT NULL,
Expand Down Expand Up @@ -579,7 +579,7 @@ CREATE TABLE node_volume (
CREATE TABLE persistent_volume (
uuid binary(16) NOT NULL,
cluster_uuid binary(16) NOT NULL,
namespace varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
namespace varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(253) COLLATE utf8mb4_unicode_ci NOT NULL,
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
resource_version varchar(255) NOT NULL,
Expand Down Expand Up @@ -621,7 +621,7 @@ CREATE TABLE persistent_volume_label (
CREATE TABLE pod (
uuid binary(16) NOT NULL,
cluster_uuid binary(16) NOT NULL,
namespace varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
namespace varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(253) COLLATE utf8mb4_unicode_ci NOT NULL,
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
resource_version varchar(255) NOT NULL,
Expand Down Expand Up @@ -668,9 +668,9 @@ CREATE TABLE pod_label (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

CREATE TABLE pod_metrics (
namespace varchar(63) NOT NULL,
namespace varchar(255) NOT NULL,
pod_name varchar(253) NOT NULL,
container_name varchar(63) NOT NULL,
container_name varchar(255) NOT NULL,
timestamp bigint unsigned NOT NULL,
duration bigint unsigned NOT NULL,
cpu_usage float NOT NULL,
Expand Down Expand Up @@ -701,7 +701,7 @@ CREATE TABLE pod_pvc (

CREATE TABLE pod_volume (
pod_uuid binary(16) NOT NULL,
volume_name varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
volume_name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
type varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
source longtext NOT NULL,
PRIMARY KEY (pod_uuid, volume_name)
Expand Down Expand Up @@ -745,7 +745,7 @@ CREATE TABLE prometheus_pod_metric (
CREATE TABLE pvc (
uuid binary(16) NOT NULL,
cluster_uuid binary(16) NOT NULL,
namespace varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
namespace varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(253) COLLATE utf8mb4_unicode_ci NOT NULL,
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
resource_version varchar(255) NOT NULL,
Expand Down Expand Up @@ -788,7 +788,7 @@ CREATE TABLE pvc_label (
CREATE TABLE replica_set (
uuid binary(16) NOT NULL,
cluster_uuid binary(16) NOT NULL,
namespace varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
namespace varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(253) COLLATE utf8mb4_unicode_ci NOT NULL,
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
resource_version varchar(255) NOT NULL,
Expand Down Expand Up @@ -841,7 +841,7 @@ CREATE TABLE replica_set_owner (
CREATE TABLE secret (
uuid binary(16) NOT NULL,
cluster_uuid binary(16) NOT NULL,
namespace varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
namespace varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(253) COLLATE utf8mb4_unicode_ci NOT NULL,
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
resource_version varchar(255) NOT NULL,
Expand All @@ -865,15 +865,15 @@ CREATE TABLE secret_label (

CREATE TABLE selector (
uuid binary(16) NOT NULL,
name varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
value varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (uuid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

CREATE TABLE service (
uuid binary(16) NOT NULL,
cluster_uuid binary(16) NOT NULL,
namespace varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
namespace varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(253) COLLATE utf8mb4_unicode_ci NOT NULL,
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
resource_version varchar(255) NOT NULL,
Expand Down Expand Up @@ -939,7 +939,7 @@ CREATE TABLE service_selector (
CREATE TABLE stateful_set (
uuid binary(16) NOT NULL,
cluster_uuid binary(16) NOT NULL,
namespace varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL,
namespace varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
name varchar(253) COLLATE utf8mb4_unicode_ci NOT NULL,
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
resource_version varchar(255) NOT NULL,
Expand Down

0 comments on commit fc6722f

Please sign in to comment.