Skip to content

Commit

Permalink
docs(reference:database): updated typo error in defaultTo examples (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
JijinJayakumar committed May 13, 2021
1 parent 0e8dbb8 commit 51fa643
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions content/reference/database/table-builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,12 @@ Adds a DateTime column to the database table. The method accepts the column name
this.schema.createTable('users', (table) => {
table
.dateTime('some_time', { useTz: true })
.defaultsTo(this.now())
.defaultTo(this.now())

// Or define the precision
table
.dateTime('some_time', { precision: 6 })
.defaultsTo(this.now(6))
.defaultTo(this.now(6))
})
```

Expand Down Expand Up @@ -665,12 +665,12 @@ In MSSQL a constraintName option may be passed to ensure a specific constraint n

```ts
this.schema.table('posts', (table) => {
table.boolean('is_published').defaultsTo(false)
table.boolean('is_published').defaultTo(false)

// For MSSQL
table
.boolean('is_published')
.defaultsTo(false, { constraintName: 'df_table_value' })
.defaultTo(false, { constraintName: 'df_table_value' })
})
```

Expand Down

0 comments on commit 51fa643

Please sign in to comment.