feat(models): removed username field form user

in dev environmnets, this will require a manual db reset (migrate:rollback, latest)
This commit is contained in:
Dimitrie Stefanescu
2020-09-16 10:30:34 +01:00
parent cc7dc5e479
commit c096ba89cc
2 changed files with 6 additions and 2 deletions
+6 -1
View File
@@ -1,6 +1,11 @@
'use strict'
const fs = require( 'fs' )
const path = require( 'path' )
const appRoot = require( 'app-root-path' )
// Load up .ENV file
require( 'dotenv' ).config( { path: `${appRoot}/.env` } )
function walk( dir ) {
let results = [ ]
@@ -42,4 +47,4 @@ module.exports = {
directory: migrationDirs
}
}
}
}
-1
View File
@@ -20,7 +20,6 @@ exports.up = async knex => {
// Users.
await knex.schema.createTable( 'users', table => {
table.string( 'id', 10 ).primary( )
table.string( 'username', 20 ).unique( ).notNullable( )
table.timestamp( 'createdAt' ).defaultTo( knex.fn.now( ) )
table.string( 'name', 256 ).notNullable( )
table.string( 'bio' )