Skip to content

Use a new configuration approach for bootstrapping a database in SQL tutorials #3891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
app:
file: 'myapp.lua'

groups:
group001:
replicasets:
replicaset001:
instances:
instance001:
iproto:
listen:
- uri: '127.0.0.1:3301'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
instance001:
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- myapp.lua --

box.schema.user.grant('guest', 'read,write,execute', 'universe')

local function bootstrap()
if not box.space.mysqldaemon then
s = box.schema.space.create('mysqldaemon')
s:create_index('primary',
{ type = 'tree', parts = { 1, 'unsigned' }, if_not_exists = true })
end
if not box.space.mysqldata then
t = box.schema.space.create('mysqldata')
t:create_index('primary',
{ type = 'tree', parts = { 1, 'unsigned' }, if_not_exists = true })
end
end
bootstrap()
4 changes: 2 additions & 2 deletions doc/contributing/docs/markup/code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ For code snippets, we use the ``code-block:: language``
You can enable syntax highlighting if you specify the language for the snippet.
The most commonly used highlighting languages are:

* ``tarantoolsession``interactive Tarantool session,
* ``tarantoolsession`` -- interactive Tarantool session,
where command lines start with ``tarantool>`` prompt.
* ``console``interactive console session, where command lines
* ``console`` -- interactive console session, where command lines
start with ``$`` or ``#``.
* ``lua``, ``bash`` or ``c`` for programming languages.
* ``text`` for cases when we want the code block to have no highlighting.
Expand Down
Loading