Commit 745821a3 authored by EKbfh's avatar EKbfh 🐼
Browse files

Merge branch 'change-playbook-repo' into 'master'

Add migration for playbook url

See merge request !68
parents a9d751e1 1aba44fa
Pipeline #28409 passed with stages
in 7 minutes and 2 seconds
# Third-party modules
from peewee import CharField, Model
def migrate(migrator):
class Environment(Model):
class Meta(object):
database = migrator.db
db_table = "environment"
name = CharField(unique=True)
playbook_link = CharField()
if len(Environment.select()) != 0:
for env in Environment.select():
if env.playbook_link == 'git+https://github.com/nocproject/ansible_deploy@microservices':
env.playbook_link = "git+https://github.com/nocproject/noc@stable"
env.save()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment