<?php

use Phalcon\Db\Column;
use Phalcon\Db\Index;
use Phalcon\Db\Reference;
use Phalcon\Mvc\Model\Migration;

class CaptchasMigration_266 extends Migration
{
    public function up()
    {
        self::$connection->execute("
            DROP TABLE if exists jaga.captchas;

            CREATE TABLE jaga.captchas
            (
                id serial primary key,
                uuid varchar(36) not null unique,
                answer varchar(36) not null,
                expired_at timestamp(6) not null,
                answered_at timestamp(6)
            );
        ");
    }

    public function down()
    {
        self::$connection->execute("
            DROP TABLE if exists jaga.captchas;
        ");
    }
}
