Skip to content

Commit

Permalink
Documenation for no precision decimal columns knex/knex#2353 (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivome authored and elhigu committed Feb 8, 2018
1 parent 986e12b commit 4424419
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sections/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export default [
type: "method",
method: "decimal",
example: "table.decimal(column, [precision], [scale])",
description: "Adds a decimal column, with optional precision (defaults to 8) and scale (defaults to 2).",
description: "Adds a decimal column, with optional precision (defaults to 8) and scale (defaults to 2). Specifying NULL as precision creates a decimal column that can store numbers of any precision and scale. (Only supported for Oracle, SQLite, Postgres)",
children: [ ]
},
{
Expand Down Expand Up @@ -490,9 +490,9 @@ export default [
knex.schema.alterTable('user', function(t) {
t.increments().primary(); // add
// drops previous default value from column, change type to string and add not nullable constraint
t.string('username', 35).notNullable().alter();
t.string('username', 35).notNullable().alter();
// drops both not null contraint and the default value
t.integer('age').alter();
t.integer('age').alter();
});
`
},
Expand Down

0 comments on commit 4424419

Please sign in to comment.