* Remove the server_id from session table, change it to worker_id on session_connection This is step 1 in updating the worker table. The worker is becoming a public resource so it must have a public id. We drop the server_id column on the session_connection table and add the worker_id column so we can use the wt_public_key type. Since db migrations are applied while the controller is offline, it should be safe to assume all session connections are not in a running state, thus allowing us to null out all the worker ids in the session_connection table. For now we don't have very good enforcement of the wt_public_id contraints, since the id is currently defined in the worker config, but this will soon change and the worker's id will be generated by the controller. * Updating server_id references to controller_id. * Adding worker tag db writing test. * Move the server table back to the top. * Update comment for the worker object. * Update comment for the worker table. * Update the newWorkerId call to take a context and fix its error. * Correct comment for the wt_network_address domain.
12 lines
305 B
Go
12 lines
305 B
Go
package store
|
|
|
|
// TableName overrides the table name used by Controller to `server_controller`
|
|
func (Controller) TableName() string {
|
|
return "server_controller"
|
|
}
|
|
|
|
// TableName overrides the table name used by WorkerTag to `worker_tag`
|
|
func (WorkerTag) TableName() string {
|
|
return "server_worker_tag"
|
|
}
|