You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-6Lines changed: 1 addition & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,6 @@ This repository contains the source files for the CockroachDB documentation avai
6
6
7
7
Want a topic added to the docs? Need additional details or clarification? See an error or other problem? Please [open an issue](https://github.com/cockroachdb/docs/issues).
8
8
9
-
## Write Docs
10
-
11
-
Want to contribute to the docs? See [CONTRIBUTING](CONTRIBUTING.md) for details about setting yourself up and getting started.
Copy file name to clipboardExpand all lines: StyleGuide.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -213,7 +213,7 @@ CockroachDB docs are mainly comprised of pages (`.md`) and images (`.png` or `.g
213
213
-`this-is-a-doc.md`
214
214
-`name-of-your-image.png`
215
215
216
-
Each version's pages are found in a directory named for the version. For example, pages for CockroachDB v21.1 are in the `docs > v21.1` directory. For more information about page structure, see the [Pages](https://github.com/cockroachdb/docs/blob/main/CONTRIBUTING.md#pages) section in our [Contributing Guide](https://github.com/cockroachdb/docs/blob/main/CONTRIBUTING.md). For more information about how to style page content, see [Components](#components).
216
+
Each version's pages are found in a directory named for the version. For example, pages for CockroachDB v21.1 are in the `docs > src > current > v21.1` directory. For more information about how to style page content, see [Components](#components).
217
217
218
218
Each version's images are stored in a versioned directory under the `images` directory. For example, images for CockroachDB v21.1 are in the `docs > images > v21.1` directory. For more information, see [Images](#images).
||[Org. Member]({% link cockroachcloud/authorization.md %}#organization-member) |[Org. Admin]({% link cockroachcloud/authorization.md %}#organization-admin) |[Billing Coord.]({% link cockroachcloud/authorization.md %}#billing-coordinator) |[Cluster Creator]({% link cockroachcloud/authorization.md %}#cluster-creator) |[Cluster Operator]({% link cockroachcloud/authorization.md %}#cluster-operator) |[Cluster Admin]({% link cockroachcloud/authorization.md %}#cluster-admin) |[Cluster Developer]({% link cockroachcloud/authorization.md %}#cluster-developer) |[Cluster Monitor]({% link cockroachcloud/authorization.md %}#cluster-monitor)<supid="fnref1"><ahref="#fn1">1</a></sup> |[Metrics Viewer]({% link cockroachcloud/authorization.md %}#metrics-viewer)<supid="fnref1"><ahref="#fn1">1</a></sup> |[Folder Admin]({% link cockroachcloud/authorization.md %}#folder-admin) |[Folder Mover]({% link cockroachcloud/authorization.md %}#folder-mover)|
<aid="fn1"><sup>1</sup></a>**This feature is in [limited access]({% link {{ site.current_cloud_version }}/cockroachdb-feature-availability.md %})** and is only available to enrolled organizations. To enroll your organization, contact your Cockroach Labs account team. This feature is subject to change.
45
47
46
48
Some roles can be assigned to users at specific levels of scope to provide more granular permission control:
|`Organization`| Applies to the entire CockroachDB {{ site.data.products.cloud }} organization, including all clusters and folders |`Cluster Operator`, `Cluster Admin`, `Cluster Creator`, `Cluster Developer`, `Billing Coordinator`, `Organization Admin`, `Folder Admin`, `Folder Mover`|
51
-
|`Folder`| Applies to clusters within a specific [folder]({% link cockroachcloud/folders.md %}). Only available as a selectable scope if folders have been created within the organization by a user with the `Folder Admin` role |`Cluster Operator`, `Cluster Admin`, `Cluster Creator`, `Cluster Developer`, `Folder Admin`, `Folder Mover`|
52
-
|`Cluster`| Applies to a specific cluster |`Cluster Operator`, `Cluster Admin`, `Cluster Developer`|
52
+
|`Organization`| Applies to the entire CockroachDB {{ site.data.products.cloud }} organization, including all clusters and folders |`Cluster Operator`, `Cluster Admin`, `Cluster Creator`, `Cluster Developer`, `Cluster Monitor`, `Metrics Viewer`, `Billing Coordinator`, `Organization Admin`, `Folder Admin`, `Folder Mover`|
53
+
|`Folder`| Applies to clusters within a specific [folder]({% link cockroachcloud/folders.md %}). Only available as a selectable scope if folders have been created within the organization by a user with the `Folder Admin` role |`Cluster Operator`, `Cluster Admin`, `Cluster Creator`, `Cluster Developer`, `Cluster Monitor`, `Metrics Viewer`, `Folder Admin`, `Folder Mover`|
54
+
|`Cluster`| Applies to a specific cluster |`Cluster Operator`, `Cluster Admin`, `Cluster Developer`, `Cluster Monitor`, `Metrics Viewer`|
53
55
54
-
{% if page.name != 'authorization.md' %}For more information on these roles and the specific permissions given, see [Organization user roles]({% link cockroachcloud/authorization.md %}#organization-member).{% endif %}
56
+
{% if page.name != 'authorization.md' %}For more information on these roles and the specific permissions given, see [Organization user roles]({% link cockroachcloud/authorization.md %}#organization-member).{% endif %}
The following instructions show how to change the mapping of the [`crdb_internal_region`]({% link {{ page.version.version }}/alter-table.md %}#crdb_region) column that determines row locality for a [regional by row table]({% link {{ page.version.version }}/regional-tables.md %}#regional-by-row-tables) where the [column was already defined with `REGIONAL BY ROW AS {column}`]{% if page.name == "create-table.md" %}(#create-a-table-with-a-regional-by-row-locality-using-a-custom-region-column){% elsif page.name == "alter-table.md" %}(#rename-crdb_region){% else %}({% link {{ page.version.version }}/create-table.md %}#create-a-table-with-a-regional-by-row-locality-using-a-custom-region-column){% endif %}. This method [alters the computed column's expression]({% link {{ page.version.version }}/computed-columns.md %}#alter-the-formula-for-a-computed-column).
2
+
3
+
1.[Add a new region column]({% link {{ page.version.version }}/alter-table.md %}#add-column) of the same type (`crdb_internal_region`) with the updated scalar expression for the computed column:
4
+
5
+
{% include_cached copy-clipboard.html %}
6
+
~~~sql
7
+
ALTERTABLEapp.public.users ADD COLUMN region_new crdb_internal_region AS ({new_expression}) STORED;
8
+
~~~
9
+
10
+
1. Atomically [swap the column names]({% link {{ page.version.version }}/alter-table.md %}#rename-column) so the new computed column takes the original name:
11
+
12
+
{% include_cached copy-clipboard.html %}
13
+
~~~ sql
14
+
ALTERTABLEapp.public.users RENAME COLUMN region TO region_prev, RENAME COLUMN region_new TO region;
15
+
~~~
16
+
17
+
1. Point the table locality at the new computed column using [`ALTER TABLE ... SET LOCALITY`]({% link {{ page.version.version }}/alter-table.md %}#set-locality):
18
+
19
+
{% include_cached copy-clipboard.html %}
20
+
~~~ sql
21
+
ALTERTABLEapp.public.users SET LOCALITY REGIONAL BY ROW AS region;
22
+
~~~
23
+
24
+
1. After verifying the changes have occurred (using a query like`SELECT region, * FROM app.public.users WHERE ...`), [drop the previous computed column]({% link {{ page.version.version }}/alter-table.md %}#drop-column):
25
+
26
+
{% include_cached copy-clipboard.html %}
27
+
~~~ sql
28
+
ALTERTABLEapp.public.users DROP COLUMN region_prev;
The following instructions show how to change the mapping of the [`crdb_internal_region`]({% link {{ page.version.version }}/alter-table.md %}#crdb_region) column that determines row locality for a [regional by row table]({% link {{ page.version.version }}/regional-tables.md %}#regional-by-row-tables) where the [column was already defined with `REGIONAL BY ROW AS {column}`]{% if page.name == "create-table.md" %}(#create-a-table-with-a-regional-by-row-locality-using-a-custom-region-column){% elsif page.name == "alter-table.md" %}(#rename-crdb_region){% else %}({% link {{ page.version.version }}/create-table.md %}#create-a-table-with-a-regional-by-row-locality-using-a-custom-region-column){% endif %}. This method [alters the computed column's expression]({% link {{ page.version.version }}/computed-columns.md %}#alter-the-formula-for-a-computed-column).
2
+
3
+
1.[Add a new region column]({% link {{ page.version.version }}/alter-table.md %}#add-column) of the same type (`crdb_internal_region`) with the updated scalar expression for the computed column:
4
+
5
+
{% include_cached copy-clipboard.html %}
6
+
~~~sql
7
+
ALTERTABLEapp.public.users ADD COLUMN region_new crdb_internal_region AS ({new_expression}) STORED;
8
+
~~~
9
+
10
+
1. Atomically [swap the column names]({% link {{ page.version.version }}/alter-table.md %}#rename-column) so the new computed column takes the original name:
11
+
12
+
{% include_cached copy-clipboard.html %}
13
+
~~~ sql
14
+
ALTERTABLEapp.public.users RENAME COLUMN region TO region_prev, RENAME COLUMN region_new TO region;
15
+
~~~
16
+
17
+
1. Point the table locality at the new computed column using [`ALTER TABLE ... SET LOCALITY`]({% link {{ page.version.version }}/alter-table.md %}#set-locality):
18
+
19
+
{% include_cached copy-clipboard.html %}
20
+
~~~ sql
21
+
ALTERTABLEapp.public.users SET LOCALITY REGIONAL BY ROW AS region;
22
+
~~~
23
+
24
+
1. After verifying the changes have occurred (using a query like`SELECT region, * FROM app.public.users WHERE ...`), [drop the previous computed column]({% link {{ page.version.version }}/alter-table.md %}#drop-column):
25
+
26
+
{% include_cached copy-clipboard.html %}
27
+
~~~ sql
28
+
ALTERTABLEapp.public.users DROP COLUMN region_prev;
0 commit comments