<?php

use Phalcon\Mvc\Model\Migration;

class ConstraintMigration_299 extends Migration
{
    public function up()
    {
        $this->down(); 

        self::$connection->execute("
        ALTER TABLE jaga.diskusi DROP CONSTRAINT IF EXISTS diskusi_tenant_id_fkey;

        ALTER TABLE jaga.diskusi_comment DROP CONSTRAINT IF EXISTS diskusi_comment_tenant_id_fkey;

        ALTER TABLE jaga.diskusi_comment_like DROP CONSTRAINT IF EXISTS diskusi_comment_like_tenant_id_fkey;

        ALTER TABLE jaga.diskusi_hashtag DROP CONSTRAINT IF EXISTS diskusi_hashtag_tenant_id_fkey;

        ALTER TABLE jaga.diskusi_like DROP CONSTRAINT IF EXISTS diskusi_like_tenant_id_fkey;

        ALTER TABLE jaga.diskusi_mention DROP CONSTRAINT IF EXISTS diskusi_mention_tenant_id_fkey;

        ALTER TABLE jaga.diskusi_mention_user DROP CONSTRAINT IF EXISTS diskusi_mention_user_tenant_id_fkey;

        ALTER TABLE jaga.diskusi_mention_user DROP CONSTRAINT IF EXISTS diskusi_mention_user_tenant_mentioned_id_fkey;

        ALTER TABLE jaga.fcm_device_token DROP CONSTRAINT IF EXISTS fcm_device_token_um_tenant_id_fkey;
        
        ALTER TABLE jaga.jwt_data DROP CONSTRAINT IF EXISTS jwt_data_user_id_fkey;

        ALTER TABLE jaga.notification_blast DROP CONSTRAINT IF EXISTS notification_blast_user_id_fkey;

        ALTER TABLE jaga.notifications DROP CONSTRAINT IF EXISTS notifications_tenant_id_fkey1;

        ALTER TABLE jaga.notifications DROP CONSTRAINT IF EXISTS notifications_tenant_id_fkey;

        ALTER TABLE public.um_shared_user_role DROP CONSTRAINT IF EXISTS um_shared_user_role_um_user_id_fkey;

        ALTER TABLE public.um_user_attribute DROP CONSTRAINT IF EXISTS um_user_attribute_um_user_id_fkey;

        ALTER TABLE public.um_user_role DROP CONSTRAINT IF EXISTS um_user_role_um_user_id_fkey;
        ");
    }

    public function down()
    {

    }
}
