diff --git a/internal/db/testdata/invalidmigrations/001_initial.up.sql b/internal/db/testdata/invalidmigrations/001_initial.up.sql index 7e9086820..a7c726c60 100644 --- a/internal/db/testdata/invalidmigrations/001_initial.up.sql +++ b/internal/db/testdata/invalidmigrations/001_initial.up.sql @@ -1,4 +1,4 @@ --- 1_1.sql initialises an empty database. +-- initialises an empty database. CREATE TABLE IF NOT EXISTS test ( id BIGSERIAL PRIMARY KEY, diff --git a/internal/db/testdata/invalidmigrations/002_add_invalid_table.up.sql b/internal/db/testdata/invalidmigrations/002_add_invalid_table.up.sql index 0ad8c4e52..911c50079 100644 --- a/internal/db/testdata/invalidmigrations/002_add_invalid_table.up.sql +++ b/internal/db/testdata/invalidmigrations/002_add_invalid_table.up.sql @@ -1,4 +1,4 @@ --- 1_2.sql is a migration that adds an invalid table. +-- adds an invalid table. CREATE TABLE IF NOT EXISTS invalid ( id BIGSERIAL PRIMARY KEY, diff --git a/internal/db/testdata/invalidmigrations/003_add_another_table.up.sql b/internal/db/testdata/invalidmigrations/003_add_another_table.up.sql index 083e65225..1975577f0 100644 --- a/internal/db/testdata/invalidmigrations/003_add_another_table.up.sql +++ b/internal/db/testdata/invalidmigrations/003_add_another_table.up.sql @@ -1,4 +1,4 @@ --- 1_3.sql is a migration that adds an controller table. +-- adds an controller table. CREATE TABLE IF NOT EXISTS controller ( id BIGSERIAL PRIMARY KEY, diff --git a/internal/db/testdata/validmigrations/001_initial.up.sql b/internal/db/testdata/validmigrations/001_initial.up.sql index 7e9086820..a7c726c60 100644 --- a/internal/db/testdata/validmigrations/001_initial.up.sql +++ b/internal/db/testdata/validmigrations/001_initial.up.sql @@ -1,4 +1,4 @@ --- 1_1.sql initialises an empty database. +-- initialises an empty database. CREATE TABLE IF NOT EXISTS test ( id BIGSERIAL PRIMARY KEY, diff --git a/internal/db/testdata/validmigrations/002_add_table.up.sql b/internal/db/testdata/validmigrations/002_add_table.up.sql index fa3a95a7a..013df327c 100644 --- a/internal/db/testdata/validmigrations/002_add_table.up.sql +++ b/internal/db/testdata/validmigrations/002_add_table.up.sql @@ -1,4 +1,4 @@ --- 1_2.sql is a migration that adds a valid table. +-- adds a valid table. CREATE TABLE IF NOT EXISTS valid ( id BIGSERIAL PRIMARY KEY diff --git a/internal/db/testdata/validmigrations/003_add_another_table.up.sql b/internal/db/testdata/validmigrations/003_add_another_table.up.sql index 083e65225..a1a03e739 100644 --- a/internal/db/testdata/validmigrations/003_add_another_table.up.sql +++ b/internal/db/testdata/validmigrations/003_add_another_table.up.sql @@ -1,4 +1,4 @@ --- 1_3.sql is a migration that adds an controller table. +-- adds a controller table. CREATE TABLE IF NOT EXISTS controller ( id BIGSERIAL PRIMARY KEY, diff --git a/internal/dbmodel/sql/postgres/001_initial.up.sql b/internal/dbmodel/sql/postgres/001_initial.up.sql index 0f3487dbe..975bda15c 100644 --- a/internal/dbmodel/sql/postgres/001_initial.up.sql +++ b/internal/dbmodel/sql/postgres/001_initial.up.sql @@ -1,4 +1,4 @@ --- 1_1.sql initialises an empty database. +-- initialises an empty database. CREATE TABLE IF NOT EXISTS audit_log ( id BIGSERIAL PRIMARY KEY, diff --git a/internal/dbmodel/sql/postgres/002_add_secrets.up.sql b/internal/dbmodel/sql/postgres/002_add_secrets.up.sql index 67038c93d..7523d08c9 100644 --- a/internal/dbmodel/sql/postgres/002_add_secrets.up.sql +++ b/internal/dbmodel/sql/postgres/002_add_secrets.up.sql @@ -1,4 +1,4 @@ --- 1_2.sql is a migration that adds a secrets table. +-- adds a secrets table. CREATE TABLE IF NOT EXISTS secrets ( id BIGSERIAL PRIMARY KEY, diff --git a/internal/dbmodel/sql/postgres/003_cloud_credentials_cascade_on_delete.up.sql b/internal/dbmodel/sql/postgres/003_cloud_credentials_cascade_on_delete.up.sql index 683b2506d..2c12d0aed 100644 --- a/internal/dbmodel/sql/postgres/003_cloud_credentials_cascade_on_delete.up.sql +++ b/internal/dbmodel/sql/postgres/003_cloud_credentials_cascade_on_delete.up.sql @@ -1,4 +1,4 @@ --- 1_3.sql is a migration that alters the foreign key relationship `cloud_credentials.cloud_name -> clouds.name` to a cascade on-delete. +-- alters the foreign key relationship `cloud_credentials.cloud_name -> clouds.name` to a cascade on-delete. ALTER TABLE cloud_credentials DROP CONSTRAINT cloud_credentials_cloud_name_fkey, diff --git a/internal/dbmodel/sql/postgres/004_remove_access_tables.up.sql b/internal/dbmodel/sql/postgres/004_remove_access_tables.up.sql index 2da8251d3..da3ce86bd 100644 --- a/internal/dbmodel/sql/postgres/004_remove_access_tables.up.sql +++ b/internal/dbmodel/sql/postgres/004_remove_access_tables.up.sql @@ -1,4 +1,4 @@ --- 1_4.sql is a migration that removes unused tables and columns previously used for access checks. +-- removes unused tables and columns previously used for access checks. DROP TABLE IF EXISTS user_application_offer_access; DROP TABLE IF EXISTS user_cloud_access; diff --git a/internal/dbmodel/sql/postgres/005_add_migrating_controller_column.up.sql b/internal/dbmodel/sql/postgres/005_add_migrating_controller_column.up.sql index f53ca1756..95d79472d 100644 --- a/internal/dbmodel/sql/postgres/005_add_migrating_controller_column.up.sql +++ b/internal/dbmodel/sql/postgres/005_add_migrating_controller_column.up.sql @@ -1,3 +1,3 @@ --- 1_5.sql is a migration that adds a column necessary for model migrations +-- adds a column necessary for model migrations ALTER TABLE models ADD COLUMN migration_controller_id INTEGER REFERENCES controllers (id); diff --git a/internal/dbmodel/sql/postgres/006_add_access_tokens_and_update_users_table.up.sql b/internal/dbmodel/sql/postgres/006_add_access_tokens_and_update_users_table.up.sql index 57c3c58fe..4a5311333 100644 --- a/internal/dbmodel/sql/postgres/006_add_access_tokens_and_update_users_table.up.sql +++ b/internal/dbmodel/sql/postgres/006_add_access_tokens_and_update_users_table.up.sql @@ -1,5 +1,5 @@ --- 1_6.sql is a migration that adds access tokens to the user table --- and is a migration that renames `user` to `identity`. +-- adds access tokens to the user table +-- and renames `user` to `identity`. ALTER TABLE users ADD COLUMN access_token TEXT; ALTER TABLE users ADD COLUMN refresh_token TEXT; diff --git a/internal/dbmodel/sql/postgres/007_add_uuid_to_groups.up.sql b/internal/dbmodel/sql/postgres/007_add_uuid_to_groups.up.sql index 81ec3420e..5c1c33222 100644 --- a/internal/dbmodel/sql/postgres/007_add_uuid_to_groups.up.sql +++ b/internal/dbmodel/sql/postgres/007_add_uuid_to_groups.up.sql @@ -1,3 +1,3 @@ --- 1_7.sql is a migration that adds a UUID column to the groups table. +-- adds a UUID column to the groups table. ALTER TABLE groups ADD COLUMN uuid TEXT NOT NULL UNIQUE; diff --git a/internal/dbmodel/sql/postgres/008_add_tls_hostname_to_controllers.up.sql b/internal/dbmodel/sql/postgres/008_add_tls_hostname_to_controllers.up.sql index 946cb98af..2950c1b15 100644 --- a/internal/dbmodel/sql/postgres/008_add_tls_hostname_to_controllers.up.sql +++ b/internal/dbmodel/sql/postgres/008_add_tls_hostname_to_controllers.up.sql @@ -1,3 +1,3 @@ --- 1_8.sql is a migration that adds a tls_hostname column to the controller table. +-- adds a tls_hostname column to the controller table. ALTER TABLE controllers ADD COLUMN tls_hostname TEXT; diff --git a/internal/dbmodel/sql/postgres/009_remove_controller_soft_delete.up.sql b/internal/dbmodel/sql/postgres/009_remove_controller_soft_delete.up.sql index 53f455942..f728f542f 100644 --- a/internal/dbmodel/sql/postgres/009_remove_controller_soft_delete.up.sql +++ b/internal/dbmodel/sql/postgres/009_remove_controller_soft_delete.up.sql @@ -1,5 +1,5 @@ --- 1_9.sql is a migration that deletes soft-deleted controllers and --- drops the deleted_at column from the controllers table. +-- deletes soft-deleted controllers and drops the +-- deleted_at column from the controllers table. DELETE FROM controllers WHERE deleted_at IS NOT null; ALTER TABLE controllers DROP COLUMN deleted_at; diff --git a/internal/dbmodel/sql/postgres/010_stricter_contraints_on_model_names.up.sql b/internal/dbmodel/sql/postgres/010_stricter_contraints_on_model_names.up.sql index 8d0c392cb..50818db54 100644 --- a/internal/dbmodel/sql/postgres/010_stricter_contraints_on_model_names.up.sql +++ b/internal/dbmodel/sql/postgres/010_stricter_contraints_on_model_names.up.sql @@ -1,5 +1,4 @@ --- 1_10.sql is a migration that enforces a stricter uniqueness --- constraint on model names. +-- enforces a stricter uniqueness constraint on model names. ALTER TABLE models DROP CONSTRAINT models_controller_id_owner_identity_name_name_key; ALTER TABLE models ADD CONSTRAINT unique_model_names UNIQUE(owner_identity_name, name); diff --git a/internal/dbmodel/sql/postgres/011_unique_offer_urls.up.sql b/internal/dbmodel/sql/postgres/011_unique_offer_urls.up.sql index 7d00f1555..bfb090253 100644 --- a/internal/dbmodel/sql/postgres/011_unique_offer_urls.up.sql +++ b/internal/dbmodel/sql/postgres/011_unique_offer_urls.up.sql @@ -1,3 +1,3 @@ --- 1_11.sql is a migration that enforces uniqueness on URLs in application offers. +-- enforces uniqueness on URLs in application offers. ALTER TABLE application_offers ADD UNIQUE (url); diff --git a/internal/dbmodel/sql/postgres/012_remove_group_soft_delete.up.sql b/internal/dbmodel/sql/postgres/012_remove_group_soft_delete.up.sql index bca87f193..8a28d325e 100644 --- a/internal/dbmodel/sql/postgres/012_remove_group_soft_delete.up.sql +++ b/internal/dbmodel/sql/postgres/012_remove_group_soft_delete.up.sql @@ -1,5 +1,4 @@ --- 1_12.sql is a migration that deletes soft-deleted groups and --- drops the deleted_at column from the groups table. +-- deletes soft-deleted groups and drops the deleted_at column from the groups table. DELETE FROM groups WHERE deleted_at IS NOT null; ALTER TABLE groups DROP COLUMN deleted_at; diff --git a/internal/dbmodel/sql/postgres/013_add_roles.up.sql b/internal/dbmodel/sql/postgres/013_add_roles.up.sql index e2ced1373..3214c4dcf 100644 --- a/internal/dbmodel/sql/postgres/013_add_roles.up.sql +++ b/internal/dbmodel/sql/postgres/013_add_roles.up.sql @@ -1,4 +1,4 @@ --- 1_13.sql is a migration that introduces the concept of roles to JIMM. +-- introduces the concept of roles to JIMM. CREATE TABLE IF NOT EXISTS roles ( id BIGSERIAL PRIMARY KEY, diff --git a/internal/dbmodel/sql/postgres/014_simplify_app_offers.up.sql b/internal/dbmodel/sql/postgres/014_simplify_app_offers.up.sql index c483b4556..00ac2a9b7 100644 --- a/internal/dbmodel/sql/postgres/014_simplify_app_offers.up.sql +++ b/internal/dbmodel/sql/postgres/014_simplify_app_offers.up.sql @@ -1,4 +1,4 @@ --- 1_14.sql is a migration simplifies application offers +-- simplifies application offers DROP INDEX IF EXISTS idx_application_offer_connections_deleted_at; DROP INDEX IF EXISTS idx_application_offer_remote_endpoints_deleted_at; diff --git a/internal/dbmodel/sql/postgres/015_drop_controller_configs.up.sql b/internal/dbmodel/sql/postgres/015_drop_controller_configs.up.sql index 842327e49..bfbc29b42 100644 --- a/internal/dbmodel/sql/postgres/015_drop_controller_configs.up.sql +++ b/internal/dbmodel/sql/postgres/015_drop_controller_configs.up.sql @@ -1,3 +1,3 @@ --- 1_15.sql is a migration to delete controller configs +-- delete controller configs table DROP TABLE controller_configs; diff --git a/internal/dbmodel/sql/postgres/016_drop_identity_model_defaults.up.sql b/internal/dbmodel/sql/postgres/016_drop_identity_model_defaults.up.sql index 66535f098..ee4351636 100644 --- a/internal/dbmodel/sql/postgres/016_drop_identity_model_defaults.up.sql +++ b/internal/dbmodel/sql/postgres/016_drop_identity_model_defaults.up.sql @@ -1,3 +1,3 @@ --- 1_16.sql is a migration to delete identitymodel defaults +-- delete identitymodel defaults table DROP TABLE identity_model_defaults; diff --git a/internal/dbmodel/sql/postgres/017_simplify_model_table.up.sql b/internal/dbmodel/sql/postgres/017_simplify_model_table.up.sql index c4d28ed5b..2c2a13439 100644 --- a/internal/dbmodel/sql/postgres/017_simplify_model_table.up.sql +++ b/internal/dbmodel/sql/postgres/017_simplify_model_table.up.sql @@ -1,4 +1,4 @@ --- 1_17.sql remove non essential fields from model. +-- remove non essential fields from model. ALTER TABLE models DROP COLUMN default_series, DROP COLUMN migration_controller_id, DROP COLUMN is_controller, DROP COLUMN cores, DROP COLUMN machines, DROP COLUMN units, DROP COLUMN type, DROP COLUMN status_status, DROP COLUMN status_info, DROP COLUMN status_data, diff --git a/internal/dbmodel/sql/postgres/018_drop_versions_table.up.sql b/internal/dbmodel/sql/postgres/018_drop_versions_table.up.sql index 6c5be04a3..1c701610d 100644 --- a/internal/dbmodel/sql/postgres/018_drop_versions_table.up.sql +++ b/internal/dbmodel/sql/postgres/018_drop_versions_table.up.sql @@ -1,3 +1,3 @@ --- 1_18.sql drops the versions table +-- deletes the versions table DROP TABLE IF EXISTS versions;