Added index to shortcode for easier queriing
This commit is contained in:
parent
c4c22a7405
commit
08140742ed
|
@ -3,7 +3,7 @@ exports.up = function (knex) {
|
|||
return knex.schema.createTable('visits', function (table) {
|
||||
table.increments('id').primary();
|
||||
table.timestamp('timestamp').defaultTo(knex.fn.now());
|
||||
table.string('shortcode');
|
||||
table.string('shortcode').index();
|
||||
table.foreign('shortcode').references('shortcode').inTable('urls');
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue