Question: I was wondering if it's possible to rename just part of a file name with a node.js script. I'm using node.js with fs. But I can only rename the whole thing.

```
1   const fs = require('fs');
  2 fs.readFile('./test.json', function(error, data) {
  3     if (error) {
  4         console.log(error);
  5         return;
  6     }
  7 
  8     var obj = JSON.parse(data);
  9     for(var p in obj) {
 10         fs.rename('./' + obj[p] + '.jpg', './' + p + '.jpg', function(err) {
 11             if ( err ) console.log('ERROR: ' + err);
 12         });
 13     }
 14 });

```

~ 

and this is my json file

```
1 {
  2         "DEC19" : "2019-12-08",
  3         "MAY19" : "2019-05-26"
  4 }

```

this json file contains only the part of the name that I want to change.

hope you can help me, and thanks (:

Answer: 
If you want to **remove** the `DEFAULT` value of a column you must define the `oldDefaultValue`.

```
// drop default
migrationBuilder.AlterColumn<bool>(
                name: "col",
                table: "my_table",
                oldDefaultValue: true, <-- THIS must be defined!
                defaultValue: null);

// Resulting Query: ALTER TABLE my_table ALTER COLUMN col DROP DEFAULT

```

Make also sure that the `<type>`, `name` (..) are also correct, because EfCore **won't** complain anything if your written `AlterColumn` statement is garbage.

---

Furthermore if your table already contains rows and you would like to add a new column with none `DEFAULT`, do the following:

```
// add column WITH default for existing rows
migrationBuilder.AddColumn<bool>(
                name: "col",
                table: "my_table",
                type: "boolean",
                nullable: false,
                defaultValue: true);

// drop default for new entries
migrationBuilder.AlterColumn<bool>(
                name: "col",
                table: "my_table",
                oldDefaultValue: true,
                defaultValue: null);

```
Booleans are value types, You need to specify a value for them unless you make a nullable boolean as @StepUp has mentioned. You can read more abouut value types [here](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/value-types)

However if you want to have a default value for `IsExternal` different then zero you can set it in your POCO class

```
public boolean IsExternalLink{ get; set; } = true; // To wahtever default value you choose

```