<?php

use Phalcon\Mvc\Model\Migration;

class StranasUserEmailMigration_402 extends Migration {
    public function up() {
        self::$connection->execute("
            DROP TABLE IF EXISTS jaga.str_user_email;
            CREATE TABLE IF NOT EXISTS jaga.str_user_email
            (
                um_id INTEGER NOT NULL PRIMARY KEY,
                email character varying,
                CONSTRAINT str_user_email_id_fkey
                    FOREIGN KEY (um_id)
                        REFERENCES jaga.um_user(um_id)
            );
        ");
    }

    public function down() {
        self::$connection->execute("
            DROP TABLE IF EXISTS jaga.str_user_email;
        ");
    }
}