private static function createDatabaseFields($table, $field, $slug, $isCreate = true)
    {
        // insert column only if it is not already in the DB
        if ($isCreate || (isset($field['canBeRemoved']) && $field['canBeRemoved'])) {
            // if field is translatable
            if($field['translatable']) {
                $table->json($slug)->nullable();
            }else{
                if($field['type']['inputType'] == "text" || $field['type']['inputType'] == "email" || $field['type']['inputType'] == "checkbox" || $field['type']['inputType'] == "radio") {
                    $table->string($slug)->nullable();
                }else if ($field['type']['inputType'] == "textarea" || $field['type']['inputType'] == "dropdown" || $field['type']['inputType'] == "editor") {
                    $table->text($slug)->nullable();
                }else if ($field['type']['inputType'] == "number") {
                    $table->integer($slug)->nullable();
                }else if ($field['type']['inputType'] == "date") {
                    $table->dateTime($slug)->nullable();
                }else if ($field['type']['inputType'] == "boolean") {
                    $table->tinyInteger($slug)->nullable();
                }else if ($field['type']['inputType'] == "db") {
                    if($field['isMultiple']) {
                        $table->json($slug)->nullable();
                    }else{
                        $table->integer($slug)->nullable();
                    }
                }
            }
        }
    }