File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11exports . up = async knex => {
22 await knex . schema
33 . alterTable ( 'pages' , table => {
4- table . json ( 'tocOptions' ) . notNullable ( ) . defaultTo ( JSON . stringify ( {
5- min : 1 ,
6- max : 2 ,
7- useDefault : true
8- } ) )
4+ table . json ( 'tocOptions' ) . nullable ( )
95 } )
6+ await knex ( 'pages' ) . whereNull ( 'tocOptions' ) . update ( {
7+ tocOptions : JSON . stringify ( {
8+ min : 1 ,
9+ max : 2 ,
10+ useDefault : true
11+ } )
12+ } )
1013}
1114
1215exports . down = knex => { }
Original file line number Diff line number Diff line change 11exports . up = async knex => {
22 await knex . schema
33 . alterTable ( 'pages' , table => {
4- table . json ( 'tocOptions' ) . notNullable ( ) . defaultTo ( JSON . stringify ( {
5- min : 1 ,
6- max : 2 ,
7- useDefault : true
8- } ) )
4+ table . json ( 'tocOptions' ) . nullable ( )
95 } )
6+ await knex ( 'pages' ) . whereNull ( 'tocOptions' ) . update ( {
7+ tocOptions : JSON . stringify ( {
8+ min : 1 ,
9+ max : 2 ,
10+ useDefault : true
11+ } )
12+ } )
1013}
1114
1215exports . down = knex => { }
You can’t perform that action at this time.
0 commit comments