1 table.increments('id')
2 table.string('account_name')
3 table.integer('age')
4 table.float('age')
5 table.decimal('balance', 8, 2)
6 table.boolean('is_admin')
7 table.date('birthday')
8 table.time('created_at')
9 table.timestamp('created_at').defaultTo(knex.fn.now())
10 table.json('profile')
11 table.jsonb('profile')
12 table.uuid('id').primary()
13
1const knex = require('knex')({
2 client: 'mysql',
3 connection: {
4 host : '127.0.0.1',
5 user : 'your_database_user',
6 password : 'your_database_password',
7 database : 'myapp_test'
8 }
9});