diff options
Diffstat (limited to 'database/migrations/1503250034279_user.ts')
-rw-r--r-- | database/migrations/1503250034279_user.ts | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/database/migrations/1503250034279_user.ts b/database/migrations/1503250034279_user.ts index 4a58213..190d47d 100644 --- a/database/migrations/1503250034279_user.ts +++ b/database/migrations/1503250034279_user.ts | |||
@@ -1,20 +1,20 @@ | |||
1 | import { BaseSchema } from '@adonisjs/lucid/schema' | 1 | import { BaseSchema } from '@adonisjs/lucid/schema'; |
2 | 2 | ||
3 | export default class extends BaseSchema { | 3 | export default class extends BaseSchema { |
4 | protected tableName = 'users' | 4 | protected tableName = 'users'; |
5 | 5 | ||
6 | public async up(): Promise<void> { | 6 | public async up(): Promise<void> { |
7 | this.schema.createTable(this.tableName, (table) => { | 7 | this.schema.createTable(this.tableName, table => { |
8 | table.increments() | 8 | table.increments(); |
9 | table.string('username', 80).notNullable() | 9 | table.string('username', 80).notNullable(); |
10 | table.string('email', 254).notNullable().unique() | 10 | table.string('email', 254).notNullable().unique(); |
11 | table.string('password', 60).notNullable() | 11 | table.string('password', 60).notNullable(); |
12 | table.json('settings') | 12 | table.json('settings'); |
13 | table.timestamps() | 13 | table.timestamps(); |
14 | }) | 14 | }); |
15 | } | 15 | } |
16 | 16 | ||
17 | public async down(): Promise<void> { | 17 | public async down(): Promise<void> { |
18 | this.schema.dropTable(this.tableName) | 18 | this.schema.dropTable(this.tableName); |
19 | } | 19 | } |
20 | } | 20 | } |