diff --git a/db/app.lua b/db/app.lua index 7cc8e18..112622b 100644 --- a/db/app.lua +++ b/db/app.lua @@ -92,5 +92,7 @@ box.once('bootstrap', function() oauth_bootstrap() server_tokens_bootstrap() cryptostore_bootstrap() - reg_pollers_bootstrap() end) + +print('applying migrations...') +reg_pollers_migration_v1() diff --git a/db/reg_pollers.lua b/db/reg_pollers.lua index 6d6ce75..01420c2 100644 --- a/db/reg_pollers.lua +++ b/db/reg_pollers.lua @@ -1,6 +1,9 @@ fiber = require 'fiber' -function reg_pollers_bootstrap() +function reg_pollers_migration_v1() + if box.space.reg_pollers ~= nil then + return + end box.schema.sequence.create('reg_pollers') reg_pollers = box.schema.create_space('reg_pollers', { format = {