blob: cdeefedc4cae3a98f09e45d5498e5ae1246c0c09 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Migration_Add_username_index extends CI_Migration {
public function up()
{
$this->db->query("
ALTER TABLE `users`
ADD UNIQUE `username` (`username`);
");
}
public function down()
{
$this->db->query("
ALTER TABLE `files`
DROP INDEX `username`;
");
}
}
|