<?php

use App\User;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddIndices extends Migration {
    public function up() {
        DB::update('alter ignore table views add unique index views_ua_id_uindex (ua, id)');
        DB::update('alter table users add unique index users_session_uindex (session)');
    }

    public function down() {
        DB::update('drop index views_ua_id_uindex on views');
        DB::update('drop index users_session_uindex on users');
    }
}
