Overview
Gerrit Patch |
[]
|
Launchpad Blueprint |
[1]
|
This blueprint proposes to subdivide the Records table, which includes all record types, into a table per record type. For instance, an "a_records" table for A records, "mx_records" table for MX records, and so on.
At this time, the migration of data from the existing Records table to the new separate tables is not included in this specification document.
Database Schema Changes - WIP
The existing Records table would become obsolete and be replaced with new tables for each record type.
Existing Tables
Records Table
Name |
Data Type |
Length |
Nullable |
Details
|
id |
CHAR |
32 |
False |
Primary Key, Generated UUID
|
created_at |
DATETIME |
- |
True |
UTC time of creation
|
updated_at |
DATETIME |
- |
True |
UTC time of last update
|
version |
INTEGER |
11 |
False |
Designate API version
|
data |
MEDIUMTEXT |
- |
False |
Data unique to a specific record
|
priority |
INTEGER |
11 |
True |
Priority value for certain types of records
|
domain_id |
CHAR |
32 |
False |
Non-unique Key, Domain ID
|
managed |
TINYINT |
1 |
True |
Boolean value indicates a managed resource
|
managed_resource_type |
VARCHAR |
50 |
True |
Managed resource type
|
managed_resource_id |
CHAR |
32 |
True |
Managed resource id
|
managed_plugin_name |
VARCHAR |
50 |
True |
Managed plugin name
|
managed_plugin_type |
VARCHAR |
50 |
True |
Managed plugin type
|
hash |
VARCHAR |
32 |
False |
Unique Key, Hash value of record
|
description |
VARCHAR |
160 |
True |
Description of record
|
status |
ENUM("Active", "Pending", "Deleted") |
- |
False |
Record status
|
tenant_id |
VARCHAR |
36 |
True |
ID of record owner
|
recordset_id |
CHAR |
32 |
False |
Non-unique Key, ID of recordset
|
managed_tenant_id |
CHAR |
32 |
True |
ID of managed owner
|
managed_resource_region |
VARCHAR |
100 |
True |
Region of managed
|
managed_extra |
VARCHAR |
100 |
True |
Extra field
|
Questions
- Can some of the fields, such as all the managed ones, be moved to the RecordSets table? The assumption being that all the Records in a RecordSet would be managed the same. Can someone verify this?
New Tables
A_Records Table
Name |
Data Type |
Length |
Nullable |
Details
|
id |
CHAR |
32 |
False |
Primary Key, Generated UUID
|
created_at |
DATETIME |
- |
True |
UTC time of creation
|
updated_at |
DATETIME |
- |
True |
UTC time of last update
|
version |
INTEGER |
11 |
False |
Designate API version
|
data |
MEDIUMTEXT |
- |
False |
IPv4 address
|
domain_id |
CHAR |
32 |
False |
Non-unique Key, Domain ID
|
managed |
TINYINT |
1 |
True |
Boolean value indicates a managed resource
|
managed_resource_type |
VARCHAR |
50 |
True |
Managed resource type
|
managed_resource_id |
CHAR |
32 |
True |
Managed resource id
|
managed_plugin_name |
VARCHAR |
50 |
True |
Managed plugin name
|
managed_plugin_type |
VARCHAR |
50 |
True |
Managed plugin type
|
hash |
VARCHAR |
32 |
False |
Unique Key, Hash value of record
|
description |
VARCHAR |
160 |
True |
Description of record
|
status |
ENUM("Active", "Pending", "Deleted") |
- |
False |
Record status
|
tenant_id |
VARCHAR |
36 |
True |
ID of record owner
|
recordset_id |
CHAR |
32 |
False |
Non-unique Key, ID of recordset
|
managed_tenant_id |
CHAR |
32 |
True |
ID of managed owner
|
managed_resource_region |
VARCHAR |
100 |
True |
Region of managed
|
managed_extra |
VARCHAR |
100 |
True |
Extra field
|
AAAA_Records Table
Name |
Data Type |
Length |
Nullable |
Details
|
id |
CHAR |
32 |
False |
Primary Key, Generated UUID
|
created_at |
DATETIME |
- |
True |
UTC time of creation
|
updated_at |
DATETIME |
- |
True |
UTC time of last update
|
version |
INTEGER |
11 |
False |
Designate API version
|
data |
MEDIUMTEXT |
- |
False |
IPv6 address
|
domain_id |
CHAR |
32 |
False |
Non-unique Key, Domain ID
|
managed |
TINYINT |
1 |
True |
Boolean value indicates a managed resource
|
managed_resource_type |
VARCHAR |
50 |
True |
Managed resource type
|
managed_resource_id |
CHAR |
32 |
True |
Managed resource id
|
managed_plugin_name |
VARCHAR |
50 |
True |
Managed plugin name
|
managed_plugin_type |
VARCHAR |
50 |
True |
Managed plugin type
|
hash |
VARCHAR |
32 |
False |
Unique Key, Hash value of record
|
description |
VARCHAR |
160 |
True |
Description of record
|
status |
ENUM("Active", "Pending", "Deleted") |
- |
False |
Record status
|
tenant_id |
VARCHAR |
36 |
True |
ID of record owner
|
recordset_id |
CHAR |
32 |
False |
Non-unique Key, ID of recordset
|
managed_tenant_id |
CHAR |
32 |
True |
ID of managed owner
|
managed_resource_region |
VARCHAR |
100 |
True |
Region of managed
|
managed_extra |
VARCHAR |
100 |
True |
Extra field
|
MX_Records Table
Name |
Data Type |
Length |
Nullable |
Details
|
id |
CHAR |
32 |
False |
Primary Key, Generated UUID
|
created_at |
DATETIME |
- |
True |
UTC time of creation
|
updated_at |
DATETIME |
- |
True |
UTC time of last update
|
version |
INTEGER |
11 |
False |
Designate API version
|
data |
MEDIUMTEXT |
- |
False |
Mail Server
|
priority |
INTEGER |
11 |
False |
Priority of MX record
|
domain_id |
CHAR |
32 |
False |
Non-unique Key, Domain ID
|
managed |
TINYINT |
1 |
True |
Boolean value indicates a managed resource
|
managed_resource_type |
VARCHAR |
50 |
True |
Managed resource type
|
managed_resource_id |
CHAR |
32 |
True |
Managed resource id
|
managed_plugin_name |
VARCHAR |
50 |
True |
Managed plugin name
|
managed_plugin_type |
VARCHAR |
50 |
True |
Managed plugin type
|
hash |
VARCHAR |
32 |
False |
Unique Key, Hash value of record
|
description |
VARCHAR |
160 |
True |
Description of record
|
status |
ENUM("Active", "Pending", "Deleted") |
- |
False |
Record status
|
tenant_id |
VARCHAR |
36 |
True |
ID of record owner
|
recordset_id |
CHAR |
32 |
False |
Non-unique Key, ID of recordset
|
managed_tenant_id |
CHAR |
32 |
True |
ID of managed owner
|
managed_resource_region |
VARCHAR |
100 |
True |
Region of managed
|
managed_extra |
VARCHAR |
100 |
True |
Extra field
|