-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add log table to database and reformat schema
- Loading branch information
Showing
1 changed file
with
49 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,51 @@ | ||
CREATE TABLE node ( | ||
id binary(20) NOT NULL, | ||
canonical_name varchar(253) 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, | ||
created bigint unsigned NOT NULL, | ||
PRIMARY KEY (id) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; | ||
CREATE TABLE node | ||
( | ||
id BINARY(20) NOT NULL, | ||
canonical_name VARCHAR(253) 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, | ||
created BIGINT UNSIGNED NOT NULL, | ||
PRIMARY KEY (id) | ||
) ENGINE = InnoDB | ||
DEFAULT CHARSET = utf8mb4 | ||
COLLATE = utf8mb4_bin; | ||
|
||
CREATE TABLE namespace ( | ||
id binary(20) NOT NULL, | ||
canonical_name varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
name varchar(63) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
uid varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
resource_version varchar(255) NOT NULL, | ||
created bigint unsigned NOT NULL, | ||
PRIMARY KEY (id) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; | ||
CREATE TABLE namespace | ||
( | ||
id BINARY(20) NOT NULL, | ||
canonical_name VARCHAR(63) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
name VARCHAR(63) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
uid VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
resource_version VARCHAR(255) NOT NULL, | ||
created BIGINT UNSIGNED NOT NULL, | ||
PRIMARY KEY (id) | ||
) ENGINE = InnoDB | ||
DEFAULT CHARSET = utf8mb4 | ||
COLLATE = utf8mb4_bin; | ||
|
||
CREATE TABLE pod ( | ||
id binary(20) NOT NULL, | ||
canonical_name varchar(317) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'namespace/name', | ||
namespace varchar(63) 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, | ||
created bigint unsigned NOT NULL, | ||
PRIMARY KEY (id) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; | ||
CREATE TABLE pod | ||
( | ||
id BINARY(20) NOT NULL, | ||
canonical_name VARCHAR(317) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'namespace/name', | ||
namespace VARCHAR(63) 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, | ||
created BIGINT UNSIGNED NOT NULL, | ||
PRIMARY KEY (id) | ||
) ENGINE = InnoDB | ||
DEFAULT CHARSET = utf8mb4 | ||
COLLATE = utf8mb4_bin; | ||
|
||
CREATE TABLE log | ||
( | ||
id BINARY(20) NOT NULL, | ||
reference_id BINARY(20) NOT NULL, | ||
container_name VARCHAR(255) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
time LONGTEXT NOT NULL, | ||
log LONGTEXT NOT NULL, | ||
PRIMARY KEY (id) | ||
) ENGINE = InnoDB | ||
DEFAULT CHARSET = utf8mb4 | ||
COLLATE = utf8mb4_bin; |