blob: ea5e3ebc0c71ee634850c856d3619bb43f20918d (
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 `users`
DROP INDEX `username`;
");
}
}
|