igorcoding / tarantool-spacer

Tarantool Spacer. Automatic schema migrations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not create the first space "secrets"

nodermann opened this issue · comments

> box.spacer:makemigration('init')
> box.spacer:migrate_up(1)

schema.lua

local spacer = require 'spacer'.get()


spacer:space({
    name = 'secrets',
    format = {
        { name = 'secret', type = 'string' },
    },
    indexes = {
        { name = 'primary', type = 'hash', unique = true, parts = { 'secret' } },
    }
})
spacer:space({
    name = 'tokens',
    format = {
        { name = 'token', type = 'string' },
    },
    indexes = {
        { name = 'primary', type = 'hash', unique = true, parts = { 'token' } },
    }
})
spacer:space({
    name = 'shared',
    format = {
        { name = 'list_id', type = 'string' },
    },
    indexes = {
        { name = 'primary', type = 'hash', unique = true, parts = { 'list_id' } },
    }
})

is my mistake