"""Create wordpress_site table.

migrator.create_model() emits CREATE TABLE IF NOT EXISTS, so this is a
no-op on installs where imav/014 (now retained as a no-op) had already
created the table.
"""

from peewee import IntegerField, CharField, Model


class WordpressSite(Model):
    class Meta:
        db_table = "wordpress_site"

    docroot = CharField(primary_key=True, null=False)
    domain = CharField(null=False)
    uid = IntegerField(null=False)


def migrate(migrator, database, fake=False, **kwargs):
    migrator.create_model(WordpressSite)


def rollback(migrator, database, fake=False, **kwargs):
    pass
