import Since from '@components/shared/Since.astro' import RailroadDiagram from '@components/RailroadDiagram.astro' import Tabs from '@components/Tabs/Tabs.astro' import TabItem from '@components/Tabs/TabItem.astro'
ALTER BUCKET statement
The ALTER BUCKET statement can be used to modify an existing defined bucket.
Statement syntax
SurrealQL Syntax
ALTER BUCKET [ IF EXISTS ] @name
[ READONLY | DROP READONLY ]
[ BACKEND @string | DROP BACKEND ]
[ PERMISSIONS @expression ]
[ COMMENT @string | DROP COMMENT ]
export const alterAst = { type: "Diagram", padding: [10, 20, 10, 20], children: [ { type: "Sequence", children: [ { type: "Terminal", text: "ALTER BUCKET" }, { type: "Optional", child: { type: "Sequence", children: [ { type: "Terminal", text: "IF" }, { type: "Terminal", text: "EXISTS" }, ], }, }, { type: "Terminal", text: "@name" }, { type: "Optional", child: { type: "Choice", index: 0, children: [ { type: "Terminal", text: "READONLY" }, { type: "Sequence", children: [ { type: "Terminal", text: "DROP" }, { type: "Terminal", text: "READONLY" }, ], }, ], }, }, { type: "Optional", child: { type: "Choice", index: 0, children: [ { type: "Sequence", children: [ { type: "Terminal", text: "BACKEND" }, { type: "Terminal", text: "@string" }, ], }, { type: "Sequence", children: [ { type: "Terminal", text: "DROP" }, { type: "Terminal", text: "BACKEND" }, ], }, ], }, }, { type: "Optional", child: { type: "Sequence", children: [ { type: "Terminal", text: "PERMISSIONS" }, { type: "NonTerminal", text: "@expression" }, ], }, }, { type: "Optional", child: { type: "Choice", index: 0, children: [ { type: "Sequence", children: [ { type: "Terminal", text: "COMMENT" }, { type: "Terminal", text: "@string" }, ], }, { type: "Sequence", children: [ { type: "Terminal", text: "DROP" }, { type: "Terminal", text: "COMMENT" }, ], }, ], }, }, ], }, ], };
Example usage
DEFINE BUCKET my_bucket BACKEND "memory";
ALTER BUCKET my_bucket COMMENT "Should we make this read-only too??";