From bec8f77905b7586c53805db3c79c2ac3fdb48448 Mon Sep 17 00:00:00 2001 From: Ryan Kuo Date: Mon, 8 Dec 2025 15:40:29 -0500 Subject: [PATCH 1/2] correct & update example to add/drop constraint --- src/current/v23.2/alter-table.md | 73 +++++++++++-------------- src/current/v24.1/alter-table.md | 80 ++++++++++++++------------- src/current/v24.2/alter-table.md | 80 ++++++++++++++------------- src/current/v24.3/alter-table.md | 80 ++++++++++++++------------- src/current/v25.1/alter-table.md | 80 ++++++++++++++------------- src/current/v25.2/alter-table.md | 80 ++++++++++++++------------- src/current/v25.3/alter-table.md | 92 ++++++++++++++++++-------------- src/current/v25.4/alter-table.md | 92 ++++++++++++++++++-------------- src/current/v26.1/alter-table.md | 92 ++++++++++++++++++-------------- 9 files changed, 383 insertions(+), 366 deletions(-) diff --git a/src/current/v23.2/alter-table.md b/src/current/v23.2/alter-table.md index d374d303954..0376bd1d87c 100644 --- a/src/current/v23.2/alter-table.md +++ b/src/current/v23.2/alter-table.md @@ -1153,71 +1153,66 @@ By default, referenced columns must be in the same database as the referencing f #### Drop and add a primary key constraint -Suppose that you want to add `name` to the composite primary key of the `users` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). +Suppose that you want to add `creation_time` to the composite primary key of the `promo_codes` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). {% include_cached copy-clipboard.html %} ~~~ sql -> SHOW CREATE TABLE users; +SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement --------------+-------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT users_pkey PRIMARY KEY (city ASC, id ASC) - | ) + table_name | create_statement +--------------+------------------------------------------------------------ + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC) + | ) (1 row) ~~~ -1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `name` column with [`ALTER COLUMN`](#alter-column). +1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `creation_time` column with [`ALTER COLUMN`](#alter-column): {% include_cached copy-clipboard.html %} ~~~ sql - > ALTER TABLE users ALTER COLUMN name SET NOT NULL; + ALTER TABLE promo_codes ALTER COLUMN creation_time SET NOT NULL; ~~~ 1. In the same transaction, `DROP` the old `"primary"` constraint and [`ADD`](#add-constraint) the new one: {% include_cached copy-clipboard.html %} ~~~ sql - > BEGIN; - > ALTER TABLE users DROP CONSTRAINT "primary"; - > ALTER TABLE users ADD CONSTRAINT "primary" PRIMARY KEY (city, name, id); - > COMMIT; - ~~~ - - ~~~ - NOTICE: primary key changes are finalized asynchronously; further schema changes on this table may be restricted until the job completes + BEGIN; + ALTER TABLE promo_codes DROP CONSTRAINT promo_codes_pkey; + ALTER TABLE promo_codes ADD CONSTRAINT promo_codes_pkey PRIMARY KEY (code, creation_time); + COMMIT; ~~~ -1. View the table structure: +1. View the updated table structure: {% include_cached copy-clipboard.html %} ~~~ sql - > SHOW CREATE TABLE users; + SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement - -------------+--------------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NOT NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT "primary" PRIMARY KEY (city ASC, name ASC, id ASC), - | FAMILY "primary" (id, city, name, address, credit_card) - | ) - (1 row) + table_name | create_statement + --------------+---------------------------------------------------------------------------- + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NOT NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC, creation_time ASC) + | ) + (1 row) ~~~ -Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `users_city_id_key`. Instead, there is just one index for the primary key constraint. +Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `promo_codes_code_key`. Instead, there is just one index for the primary key constraint. #### Add a unique index to a `REGIONAL BY ROW` table @@ -1828,10 +1823,6 @@ To unhide the column, run: ### Alter a primary key -#### Demo - -{% include_cached youtube.html video_id="MPx-LXY2D-c" %} - #### Alter a single-column primary key Suppose that you are storing the data for users of your application in a table called `users`, defined by the following `CREATE TABLE` statement: diff --git a/src/current/v24.1/alter-table.md b/src/current/v24.1/alter-table.md index 30192484011..db8aa8c12ba 100644 --- a/src/current/v24.1/alter-table.md +++ b/src/current/v24.1/alter-table.md @@ -1142,71 +1142,73 @@ By default, referenced columns must be in the same database as the referencing f #### Drop and add a primary key constraint -Suppose that you want to add `name` to the composite primary key of the `users` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). +Suppose that you want to add `creation_time` to the composite primary key of the `promo_codes` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). {% include_cached copy-clipboard.html %} ~~~ sql -> SHOW CREATE TABLE users; +SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement --------------+-------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT users_pkey PRIMARY KEY (city ASC, id ASC) - | ) + table_name | create_statement +--------------+------------------------------------------------------------ + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC) + | ) (1 row) ~~~ -1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `name` column with [`ALTER COLUMN`](#alter-column). +1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `creation_time` column with [`ALTER COLUMN`](#alter-column): {% include_cached copy-clipboard.html %} ~~~ sql - > ALTER TABLE users ALTER COLUMN name SET NOT NULL; + ALTER TABLE promo_codes ALTER COLUMN creation_time SET NOT NULL; ~~~ +1. Turn off autocommit for DDL for the current session, so that multiple DDL statements can execute within one explicit transaction: + + {% include_cached copy-clipboard.html %} + ~~~ sql + SET autocommit_before_ddl = false; + ~~~ + 1. In the same transaction, `DROP` the old `"primary"` constraint and [`ADD`](#add-constraint) the new one: {% include_cached copy-clipboard.html %} ~~~ sql - > BEGIN; - > ALTER TABLE users DROP CONSTRAINT "primary"; - > ALTER TABLE users ADD CONSTRAINT "primary" PRIMARY KEY (city, name, id); - > COMMIT; + BEGIN; + ALTER TABLE promo_codes DROP CONSTRAINT promo_codes_pkey; + ALTER TABLE promo_codes ADD CONSTRAINT promo_codes_pkey PRIMARY KEY (code, creation_time); + COMMIT; ~~~ - ~~~ - NOTICE: primary key changes are finalized asynchronously; further schema changes on this table may be restricted until the job completes - ~~~ - -1. View the table structure: +1. View the updated table structure: {% include_cached copy-clipboard.html %} ~~~ sql - > SHOW CREATE TABLE users; + SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement - -------------+--------------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NOT NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT "primary" PRIMARY KEY (city ASC, name ASC, id ASC), - | FAMILY "primary" (id, city, name, address, credit_card) - | ) - (1 row) + table_name | create_statement + --------------+---------------------------------------------------------------------------- + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NOT NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC, creation_time ASC) + | ) + (1 row) ~~~ -Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `users_city_id_key`. Instead, there is just one index for the primary key constraint. +Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `promo_codes_code_key`. Instead, there is just one index for the primary key constraint. #### Add a unique index to a `REGIONAL BY ROW` table @@ -1817,10 +1819,6 @@ To unhide the column, run: ### Alter a primary key -#### Demo - -{% include_cached youtube.html video_id="MPx-LXY2D-c" %} - #### Alter a single-column primary key Suppose that you are storing the data for users of your application in a table called `users`, defined by the following `CREATE TABLE` statement: diff --git a/src/current/v24.2/alter-table.md b/src/current/v24.2/alter-table.md index 3595a373921..8f403e7e99b 100644 --- a/src/current/v24.2/alter-table.md +++ b/src/current/v24.2/alter-table.md @@ -1115,71 +1115,73 @@ By default, referenced columns must be in the same database as the referencing f #### Drop and add a primary key constraint -Suppose that you want to add `name` to the composite primary key of the `users` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). +Suppose that you want to add `creation_time` to the composite primary key of the `promo_codes` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). {% include_cached copy-clipboard.html %} ~~~ sql -> SHOW CREATE TABLE users; +SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement --------------+-------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT users_pkey PRIMARY KEY (city ASC, id ASC) - | ) + table_name | create_statement +--------------+------------------------------------------------------------ + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC) + | ) (1 row) ~~~ -1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `name` column with [`ALTER COLUMN`](#alter-column). +1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `creation_time` column with [`ALTER COLUMN`](#alter-column): {% include_cached copy-clipboard.html %} ~~~ sql - > ALTER TABLE users ALTER COLUMN name SET NOT NULL; + ALTER TABLE promo_codes ALTER COLUMN creation_time SET NOT NULL; ~~~ +1. Turn off autocommit for DDL for the current session, so that multiple DDL statements can execute within one explicit transaction: + + {% include_cached copy-clipboard.html %} + ~~~ sql + SET autocommit_before_ddl = false; + ~~~ + 1. In the same transaction, `DROP` the old `"primary"` constraint and [`ADD`](#add-constraint) the new one: {% include_cached copy-clipboard.html %} ~~~ sql - > BEGIN; - > ALTER TABLE users DROP CONSTRAINT "primary"; - > ALTER TABLE users ADD CONSTRAINT "primary" PRIMARY KEY (city, name, id); - > COMMIT; + BEGIN; + ALTER TABLE promo_codes DROP CONSTRAINT promo_codes_pkey; + ALTER TABLE promo_codes ADD CONSTRAINT promo_codes_pkey PRIMARY KEY (code, creation_time); + COMMIT; ~~~ - ~~~ - NOTICE: primary key changes are finalized asynchronously; further schema changes on this table may be restricted until the job completes - ~~~ - -1. View the table structure: +1. View the updated table structure: {% include_cached copy-clipboard.html %} ~~~ sql - > SHOW CREATE TABLE users; + SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement - -------------+--------------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NOT NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT "primary" PRIMARY KEY (city ASC, name ASC, id ASC), - | FAMILY "primary" (id, city, name, address, credit_card) - | ) - (1 row) + table_name | create_statement + --------------+---------------------------------------------------------------------------- + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NOT NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC, creation_time ASC) + | ) + (1 row) ~~~ -Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `users_city_id_key`. Instead, there is just one index for the primary key constraint. +Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `promo_codes_code_key`. Instead, there is just one index for the primary key constraint. #### Add a unique index to a `REGIONAL BY ROW` table @@ -1790,10 +1792,6 @@ To unhide the column, run: ### Alter a primary key -#### Demo - -{% include_cached youtube.html video_id="MPx-LXY2D-c" %} - #### Alter a single-column primary key Suppose that you are storing the data for users of your application in a table called `users`, defined by the following `CREATE TABLE` statement: diff --git a/src/current/v24.3/alter-table.md b/src/current/v24.3/alter-table.md index 30192484011..db8aa8c12ba 100644 --- a/src/current/v24.3/alter-table.md +++ b/src/current/v24.3/alter-table.md @@ -1142,71 +1142,73 @@ By default, referenced columns must be in the same database as the referencing f #### Drop and add a primary key constraint -Suppose that you want to add `name` to the composite primary key of the `users` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). +Suppose that you want to add `creation_time` to the composite primary key of the `promo_codes` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). {% include_cached copy-clipboard.html %} ~~~ sql -> SHOW CREATE TABLE users; +SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement --------------+-------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT users_pkey PRIMARY KEY (city ASC, id ASC) - | ) + table_name | create_statement +--------------+------------------------------------------------------------ + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC) + | ) (1 row) ~~~ -1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `name` column with [`ALTER COLUMN`](#alter-column). +1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `creation_time` column with [`ALTER COLUMN`](#alter-column): {% include_cached copy-clipboard.html %} ~~~ sql - > ALTER TABLE users ALTER COLUMN name SET NOT NULL; + ALTER TABLE promo_codes ALTER COLUMN creation_time SET NOT NULL; ~~~ +1. Turn off autocommit for DDL for the current session, so that multiple DDL statements can execute within one explicit transaction: + + {% include_cached copy-clipboard.html %} + ~~~ sql + SET autocommit_before_ddl = false; + ~~~ + 1. In the same transaction, `DROP` the old `"primary"` constraint and [`ADD`](#add-constraint) the new one: {% include_cached copy-clipboard.html %} ~~~ sql - > BEGIN; - > ALTER TABLE users DROP CONSTRAINT "primary"; - > ALTER TABLE users ADD CONSTRAINT "primary" PRIMARY KEY (city, name, id); - > COMMIT; + BEGIN; + ALTER TABLE promo_codes DROP CONSTRAINT promo_codes_pkey; + ALTER TABLE promo_codes ADD CONSTRAINT promo_codes_pkey PRIMARY KEY (code, creation_time); + COMMIT; ~~~ - ~~~ - NOTICE: primary key changes are finalized asynchronously; further schema changes on this table may be restricted until the job completes - ~~~ - -1. View the table structure: +1. View the updated table structure: {% include_cached copy-clipboard.html %} ~~~ sql - > SHOW CREATE TABLE users; + SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement - -------------+--------------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NOT NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT "primary" PRIMARY KEY (city ASC, name ASC, id ASC), - | FAMILY "primary" (id, city, name, address, credit_card) - | ) - (1 row) + table_name | create_statement + --------------+---------------------------------------------------------------------------- + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NOT NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC, creation_time ASC) + | ) + (1 row) ~~~ -Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `users_city_id_key`. Instead, there is just one index for the primary key constraint. +Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `promo_codes_code_key`. Instead, there is just one index for the primary key constraint. #### Add a unique index to a `REGIONAL BY ROW` table @@ -1817,10 +1819,6 @@ To unhide the column, run: ### Alter a primary key -#### Demo - -{% include_cached youtube.html video_id="MPx-LXY2D-c" %} - #### Alter a single-column primary key Suppose that you are storing the data for users of your application in a table called `users`, defined by the following `CREATE TABLE` statement: diff --git a/src/current/v25.1/alter-table.md b/src/current/v25.1/alter-table.md index 7d4cd6ba99f..add9aaeadd6 100644 --- a/src/current/v25.1/alter-table.md +++ b/src/current/v25.1/alter-table.md @@ -1113,71 +1113,73 @@ By default, referenced columns must be in the same database as the referencing f #### Drop and add a primary key constraint -Suppose that you want to add `name` to the composite primary key of the `users` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). +Suppose that you want to add `creation_time` to the composite primary key of the `promo_codes` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). {% include_cached copy-clipboard.html %} ~~~ sql -> SHOW CREATE TABLE users; +SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement --------------+-------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT users_pkey PRIMARY KEY (city ASC, id ASC) - | ) + table_name | create_statement +--------------+------------------------------------------------------------ + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC) + | ) (1 row) ~~~ -1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `name` column with [`ALTER COLUMN`](#alter-column). +1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `creation_time` column with [`ALTER COLUMN`](#alter-column): {% include_cached copy-clipboard.html %} ~~~ sql - > ALTER TABLE users ALTER COLUMN name SET NOT NULL; + ALTER TABLE promo_codes ALTER COLUMN creation_time SET NOT NULL; ~~~ +1. Turn off autocommit for DDL for the current session, so that multiple DDL statements can execute within one explicit transaction: + + {% include_cached copy-clipboard.html %} + ~~~ sql + SET autocommit_before_ddl = false; + ~~~ + 1. In the same transaction, `DROP` the old `"primary"` constraint and [`ADD`](#add-constraint) the new one: {% include_cached copy-clipboard.html %} ~~~ sql - > BEGIN; - > ALTER TABLE users DROP CONSTRAINT "primary"; - > ALTER TABLE users ADD CONSTRAINT "primary" PRIMARY KEY (city, name, id); - > COMMIT; + BEGIN; + ALTER TABLE promo_codes DROP CONSTRAINT promo_codes_pkey; + ALTER TABLE promo_codes ADD CONSTRAINT promo_codes_pkey PRIMARY KEY (code, creation_time); + COMMIT; ~~~ - ~~~ - NOTICE: primary key changes are finalized asynchronously; further schema changes on this table may be restricted until the job completes - ~~~ - -1. View the table structure: +1. View the updated table structure: {% include_cached copy-clipboard.html %} ~~~ sql - > SHOW CREATE TABLE users; + SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement - -------------+--------------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NOT NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT "primary" PRIMARY KEY (city ASC, name ASC, id ASC), - | FAMILY "primary" (id, city, name, address, credit_card) - | ) - (1 row) + table_name | create_statement + --------------+---------------------------------------------------------------------------- + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NOT NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC, creation_time ASC) + | ) + (1 row) ~~~ -Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `users_city_id_key`. Instead, there is just one index for the primary key constraint. +Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `promo_codes_code_key`. Instead, there is just one index for the primary key constraint. #### Add a unique index to a `REGIONAL BY ROW` table @@ -1773,10 +1775,6 @@ To unhide the column, run: ### Alter a primary key -#### Demo - -{% include_cached youtube.html video_id="MPx-LXY2D-c" %} - #### Alter a single-column primary key Suppose that you are storing the data for users of your application in a table called `users`, defined by the following `CREATE TABLE` statement: diff --git a/src/current/v25.2/alter-table.md b/src/current/v25.2/alter-table.md index a952ea00636..ca6a2420caa 100644 --- a/src/current/v25.2/alter-table.md +++ b/src/current/v25.2/alter-table.md @@ -1203,71 +1203,73 @@ By default, referenced columns must be in the same database as the referencing f #### Drop and add a primary key constraint -Suppose that you want to add `name` to the composite primary key of the `users` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). +Suppose that you want to add `creation_time` to the composite primary key of the `promo_codes` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). {% include_cached copy-clipboard.html %} ~~~ sql -> SHOW CREATE TABLE users; +SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement --------------+-------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT users_pkey PRIMARY KEY (city ASC, id ASC) - | ) + table_name | create_statement +--------------+------------------------------------------------------------ + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC) + | ) (1 row) ~~~ -1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `name` column with [`ALTER COLUMN`](#alter-column). +1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `creation_time` column with [`ALTER COLUMN`](#alter-column): {% include_cached copy-clipboard.html %} ~~~ sql - > ALTER TABLE users ALTER COLUMN name SET NOT NULL; + ALTER TABLE promo_codes ALTER COLUMN creation_time SET NOT NULL; ~~~ +1. Turn off autocommit for DDL for the current session, so that multiple DDL statements can execute within one explicit transaction: + + {% include_cached copy-clipboard.html %} + ~~~ sql + SET autocommit_before_ddl = false; + ~~~ + 1. In the same transaction, `DROP` the old `"primary"` constraint and [`ADD`](#add-constraint) the new one: {% include_cached copy-clipboard.html %} ~~~ sql - > BEGIN; - > ALTER TABLE users DROP CONSTRAINT "primary"; - > ALTER TABLE users ADD CONSTRAINT "primary" PRIMARY KEY (city, name, id); - > COMMIT; + BEGIN; + ALTER TABLE promo_codes DROP CONSTRAINT promo_codes_pkey; + ALTER TABLE promo_codes ADD CONSTRAINT promo_codes_pkey PRIMARY KEY (code, creation_time); + COMMIT; ~~~ - ~~~ - NOTICE: primary key changes are finalized asynchronously; further schema changes on this table may be restricted until the job completes - ~~~ - -1. View the table structure: +1. View the updated table structure: {% include_cached copy-clipboard.html %} ~~~ sql - > SHOW CREATE TABLE users; + SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement - -------------+--------------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NOT NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT "primary" PRIMARY KEY (city ASC, name ASC, id ASC), - | FAMILY "primary" (id, city, name, address, credit_card) - | ) - (1 row) + table_name | create_statement + --------------+---------------------------------------------------------------------------- + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NOT NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC, creation_time ASC) + | ) + (1 row) ~~~ -Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `users_city_id_key`. Instead, there is just one index for the primary key constraint. +Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `promo_codes_code_key`. Instead, there is just one index for the primary key constraint. #### Add a unique index to a `REGIONAL BY ROW` table @@ -1869,10 +1871,6 @@ To unhide the column, run: ### Alter a primary key -#### Demo - -{% include_cached youtube.html video_id="MPx-LXY2D-c" %} - #### Alter a single-column primary key Suppose that you are storing the data for users of your application in a table called `users`, defined by the following `CREATE TABLE` statement: diff --git a/src/current/v25.3/alter-table.md b/src/current/v25.3/alter-table.md index 9f0679c48c0..2d5d22d11a0 100644 --- a/src/current/v25.3/alter-table.md +++ b/src/current/v25.3/alter-table.md @@ -1203,71 +1203,87 @@ By default, referenced columns must be in the same database as the referencing f #### Drop and add a primary key constraint -Suppose that you want to add `name` to the composite primary key of the `users` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). +Suppose that you want to add `creation_time` to the composite primary key of the `promo_codes` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). {% include_cached copy-clipboard.html %} ~~~ sql -> SHOW CREATE TABLE users; +SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement --------------+-------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT users_pkey PRIMARY KEY (city ASC, id ASC) - | ) + table_name | create_statement +--------------+------------------------------------------------------------ + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC) + | ) WITH (schema_locked = true); (1 row) ~~~ -1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `name` column with [`ALTER COLUMN`](#alter-column). +1. The table is [schema-locked]({% link {{ page.version.version }}/with-storage-parameter.md %}#table-parameters), which means schema changes are disallowed on the table. To make [DDL]({% link {{ page.version.version }}/sql-statements.md %}#data-definition-statements) changes, unlock the table: + + {% include_cached copy-clipboard.html %} + ~~~ sql + ALTER TABLE promo_codes SET (schema_locked = false); + ~~~ + +1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `creation_time` column with [`ALTER COLUMN`](#alter-column): {% include_cached copy-clipboard.html %} ~~~ sql - > ALTER TABLE users ALTER COLUMN name SET NOT NULL; + ALTER TABLE promo_codes ALTER COLUMN creation_time SET NOT NULL; ~~~ +1. Turn off autocommit for DDL for the current session, so that multiple DDL statements can execute within one explicit transaction: + + {% include_cached copy-clipboard.html %} + ~~~ sql + SET autocommit_before_ddl = false; + ~~~ + 1. In the same transaction, `DROP` the old `"primary"` constraint and [`ADD`](#add-constraint) the new one: {% include_cached copy-clipboard.html %} ~~~ sql - > BEGIN; - > ALTER TABLE users DROP CONSTRAINT "primary"; - > ALTER TABLE users ADD CONSTRAINT "primary" PRIMARY KEY (city, name, id); - > COMMIT; + BEGIN; + ALTER TABLE promo_codes DROP CONSTRAINT promo_codes_pkey; + ALTER TABLE promo_codes ADD CONSTRAINT promo_codes_pkey PRIMARY KEY (code, creation_time); + COMMIT; ~~~ - ~~~ - NOTICE: primary key changes are finalized asynchronously; further schema changes on this table may be restricted until the job completes - ~~~ +1. Re-enable `schema_locked` on the table: -1. View the table structure: + {% include_cached copy-clipboard.html %} + ~~~ sql + ALTER TABLE promo_codes SET (schema_locked = true); + ~~~ + +1. View the updated table structure: {% include_cached copy-clipboard.html %} ~~~ sql - > SHOW CREATE TABLE users; + SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement - -------------+--------------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NOT NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT "primary" PRIMARY KEY (city ASC, name ASC, id ASC), - | FAMILY "primary" (id, city, name, address, credit_card) - | ) - (1 row) + table_name | create_statement + --------------+---------------------------------------------------------------------------- + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NOT NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC, creation_time ASC) + | ) WITH (schema_locked = true); + (1 row) ~~~ -Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `users_city_id_key`. Instead, there is just one index for the primary key constraint. +Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `promo_codes_code_key`. Instead, there is just one index for the primary key constraint. #### Add a unique index to a `REGIONAL BY ROW` table @@ -1863,10 +1879,6 @@ To unhide the column, run: ### Alter a primary key -#### Demo - -{% include_cached youtube.html video_id="MPx-LXY2D-c" %} - #### Alter a single-column primary key Suppose that you are storing the data for users of your application in a table called `users`, defined by the following `CREATE TABLE` statement: diff --git a/src/current/v25.4/alter-table.md b/src/current/v25.4/alter-table.md index d87e7812434..09bf6cf535e 100644 --- a/src/current/v25.4/alter-table.md +++ b/src/current/v25.4/alter-table.md @@ -1203,71 +1203,87 @@ By default, referenced columns must be in the same database as the referencing f #### Drop and add a primary key constraint -Suppose that you want to add `name` to the composite primary key of the `users` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). +Suppose that you want to add `creation_time` to the composite primary key of the `promo_codes` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). {% include_cached copy-clipboard.html %} ~~~ sql -> SHOW CREATE TABLE users; +SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement --------------+-------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT users_pkey PRIMARY KEY (city ASC, id ASC) - | ) + table_name | create_statement +--------------+------------------------------------------------------------ + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC) + | ) WITH (schema_locked = true); (1 row) ~~~ -1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `name` column with [`ALTER COLUMN`](#alter-column). +1. The table is [schema-locked]({% link {{ page.version.version }}/with-storage-parameter.md %}#table-parameters), which means schema changes are disallowed on the table. To make [DDL]({% link {{ page.version.version }}/sql-statements.md %}#data-definition-statements) changes, unlock the table: + + {% include_cached copy-clipboard.html %} + ~~~ sql + ALTER TABLE promo_codes SET (schema_locked = false); + ~~~ + +1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `creation_time` column with [`ALTER COLUMN`](#alter-column): {% include_cached copy-clipboard.html %} ~~~ sql - > ALTER TABLE users ALTER COLUMN name SET NOT NULL; + ALTER TABLE promo_codes ALTER COLUMN creation_time SET NOT NULL; ~~~ +1. Turn off autocommit for DDL for the current session, so that multiple DDL statements can execute within one explicit transaction: + + {% include_cached copy-clipboard.html %} + ~~~ sql + SET autocommit_before_ddl = false; + ~~~ + 1. In the same transaction, `DROP` the old `"primary"` constraint and [`ADD`](#add-constraint) the new one: {% include_cached copy-clipboard.html %} ~~~ sql - > BEGIN; - > ALTER TABLE users DROP CONSTRAINT "primary"; - > ALTER TABLE users ADD CONSTRAINT "primary" PRIMARY KEY (city, name, id); - > COMMIT; + BEGIN; + ALTER TABLE promo_codes DROP CONSTRAINT promo_codes_pkey; + ALTER TABLE promo_codes ADD CONSTRAINT promo_codes_pkey PRIMARY KEY (code, creation_time); + COMMIT; ~~~ - ~~~ - NOTICE: primary key changes are finalized asynchronously; further schema changes on this table may be restricted until the job completes - ~~~ +1. Re-enable `schema_locked` on the table: -1. View the table structure: + {% include_cached copy-clipboard.html %} + ~~~ sql + ALTER TABLE promo_codes SET (schema_locked = true); + ~~~ + +1. View the updated table structure: {% include_cached copy-clipboard.html %} ~~~ sql - > SHOW CREATE TABLE users; + SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement - -------------+--------------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NOT NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT "primary" PRIMARY KEY (city ASC, name ASC, id ASC), - | FAMILY "primary" (id, city, name, address, credit_card) - | ) - (1 row) + table_name | create_statement + --------------+---------------------------------------------------------------------------- + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NOT NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC, creation_time ASC) + | ) WITH (schema_locked = true); + (1 row) ~~~ -Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `users_city_id_key`. Instead, there is just one index for the primary key constraint. +Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `promo_codes_code_key`. Instead, there is just one index for the primary key constraint. #### Add a unique index to a `REGIONAL BY ROW` table @@ -1863,10 +1879,6 @@ To unhide the column, run: ### Alter a primary key -#### Demo - -{% include_cached youtube.html video_id="MPx-LXY2D-c" %} - #### Alter a single-column primary key Suppose that you are storing the data for users of your application in a table called `users`, defined by the following `CREATE TABLE` statement: diff --git a/src/current/v26.1/alter-table.md b/src/current/v26.1/alter-table.md index d87e7812434..09bf6cf535e 100644 --- a/src/current/v26.1/alter-table.md +++ b/src/current/v26.1/alter-table.md @@ -1203,71 +1203,87 @@ By default, referenced columns must be in the same database as the referencing f #### Drop and add a primary key constraint -Suppose that you want to add `name` to the composite primary key of the `users` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). +Suppose that you want to add `creation_time` to the composite primary key of the `promo_codes` table, [without creating a secondary index of the existing primary key](#changing-primary-keys-with-add-constraint-primary-key). {% include_cached copy-clipboard.html %} ~~~ sql -> SHOW CREATE TABLE users; +SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement --------------+-------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT users_pkey PRIMARY KEY (city ASC, id ASC) - | ) + table_name | create_statement +--------------+------------------------------------------------------------ + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC) + | ) WITH (schema_locked = true); (1 row) ~~~ -1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `name` column with [`ALTER COLUMN`](#alter-column). +1. The table is [schema-locked]({% link {{ page.version.version }}/with-storage-parameter.md %}#table-parameters), which means schema changes are disallowed on the table. To make [DDL]({% link {{ page.version.version }}/sql-statements.md %}#data-definition-statements) changes, unlock the table: + + {% include_cached copy-clipboard.html %} + ~~~ sql + ALTER TABLE promo_codes SET (schema_locked = false); + ~~~ + +1. Add a [`NOT NULL`]({% link {{ page.version.version }}/not-null.md %}) constraint to the `creation_time` column with [`ALTER COLUMN`](#alter-column): {% include_cached copy-clipboard.html %} ~~~ sql - > ALTER TABLE users ALTER COLUMN name SET NOT NULL; + ALTER TABLE promo_codes ALTER COLUMN creation_time SET NOT NULL; ~~~ +1. Turn off autocommit for DDL for the current session, so that multiple DDL statements can execute within one explicit transaction: + + {% include_cached copy-clipboard.html %} + ~~~ sql + SET autocommit_before_ddl = false; + ~~~ + 1. In the same transaction, `DROP` the old `"primary"` constraint and [`ADD`](#add-constraint) the new one: {% include_cached copy-clipboard.html %} ~~~ sql - > BEGIN; - > ALTER TABLE users DROP CONSTRAINT "primary"; - > ALTER TABLE users ADD CONSTRAINT "primary" PRIMARY KEY (city, name, id); - > COMMIT; + BEGIN; + ALTER TABLE promo_codes DROP CONSTRAINT promo_codes_pkey; + ALTER TABLE promo_codes ADD CONSTRAINT promo_codes_pkey PRIMARY KEY (code, creation_time); + COMMIT; ~~~ - ~~~ - NOTICE: primary key changes are finalized asynchronously; further schema changes on this table may be restricted until the job completes - ~~~ +1. Re-enable `schema_locked` on the table: -1. View the table structure: + {% include_cached copy-clipboard.html %} + ~~~ sql + ALTER TABLE promo_codes SET (schema_locked = true); + ~~~ + +1. View the updated table structure: {% include_cached copy-clipboard.html %} ~~~ sql - > SHOW CREATE TABLE users; + SHOW CREATE TABLE promo_codes; ~~~ ~~~ - table_name | create_statement - -------------+--------------------------------------------------------------------- - users | CREATE TABLE users ( - | id UUID NOT NULL, - | city VARCHAR NOT NULL, - | name VARCHAR NOT NULL, - | address VARCHAR NULL, - | credit_card VARCHAR NULL, - | CONSTRAINT "primary" PRIMARY KEY (city ASC, name ASC, id ASC), - | FAMILY "primary" (id, city, name, address, credit_card) - | ) - (1 row) + table_name | create_statement + --------------+---------------------------------------------------------------------------- + promo_codes | CREATE TABLE public.promo_codes ( + | code VARCHAR NOT NULL, + | description VARCHAR NULL, + | creation_time TIMESTAMP NOT NULL, + | expiration_time TIMESTAMP NULL, + | rules JSONB NULL, + | CONSTRAINT promo_codes_pkey PRIMARY KEY (code ASC, creation_time ASC) + | ) WITH (schema_locked = true); + (1 row) ~~~ -Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `users_city_id_key`. Instead, there is just one index for the primary key constraint. +Using [`ALTER PRIMARY KEY`]({% link {{ page.version.version }}/alter-table.md %}#alter-primary-key) would have created a `UNIQUE` secondary index called `promo_codes_code_key`. Instead, there is just one index for the primary key constraint. #### Add a unique index to a `REGIONAL BY ROW` table @@ -1863,10 +1879,6 @@ To unhide the column, run: ### Alter a primary key -#### Demo - -{% include_cached youtube.html video_id="MPx-LXY2D-c" %} - #### Alter a single-column primary key Suppose that you are storing the data for users of your application in a table called `users`, defined by the following `CREATE TABLE` statement: From 9fcb5fca627598f9c53f16068fbfd2affc0bd567 Mon Sep 17 00:00:00 2001 From: Ryan Kuo Date: Mon, 8 Dec 2025 16:12:09 -0500 Subject: [PATCH 2/2] drop bad Gemfile line --- src/current/Gemfile | 1 - 1 file changed, 1 deletion(-) diff --git a/src/current/Gemfile b/src/current/Gemfile index 19febc92ff2..de20eb2bc1d 100644 --- a/src/current/Gemfile +++ b/src/current/Gemfile @@ -13,7 +13,6 @@ gem "redcarpet", "~> 3.6" gem "rss" gem "webrick" gem "jekyll-minifier" -gem "bundler", "~> 2.4" group :jekyll_plugins do gem "jekyll-include-cache"