Bitnami OSX install of Dreamfactory 2 - Table does not exist in the database

Manage to create a table called event in my local OSX install from Bitnami. Had errors right from the start, telling me the table existed already, and refusing to save it, but it still gets saved somehow because its there when I refresh the page, but then it doesn’t exist again when I try to add data.

When I use the api docs to see what’s actually there, the table is listed as a resource when I get all tables, and it sees the table in the select menu for GET /db/_table/{table_name} , but then it returns an error as below

{
“error”: {
“context”: null,
“message”: “Table “event” does not exist in the database.”,
“code”: 404,
“trace”: [
"|",
"|",
"|#0 [internal function]: DreamFactory\Core\Resources\BaseDbTableResource->handleGet()",
"|",
"|#1 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Components/RestHandler.php(271):",
"|----> call_user_func(Array)",
"|",
"|#2 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Components/RestHandler.php(177):",
"|----> DreamFactory\Core\Components\RestHandler->processRequest()",
"|",
"|#3 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Components/RestHandler.php(224):",
"|----> DreamFactory\Core\Components\RestHandler->handleRequest(Object(DreamFactory\Core\Utility\ServiceRequest), ‘event’)",
"|",
"|#4 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Services/BaseDbService.php(110):",
"|----> DreamFactory\Core\Components\RestHandler->handleResource(Array)",
"|",
"|#5 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Components/RestHandler.php(172):",
"|----> DreamFactory\Core\Services\BaseDbService->handleResource(Array)",
"|",
"|#6 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Services/BaseRestService.php(65):",
"|----> DreamFactory\Core\Components\RestHandler->handleRequest(Object(DreamFactory\Core\Utility\ServiceRequest), ‘_table/event’)",
"|",
"|#7 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/vendor/dreamfactory/df-core/src/Utility/ServiceHandler.php(57):",
"|----> DreamFactory\Core\Services\BaseRestService->handleRequest(Object(DreamFactory\Core\Utility\ServiceRequest), ‘_table/event’)",
"|",
"|#8 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(17419):",
"|----> DreamFactory\Core\Utility\ServiceHandler::processRequest(‘v2’, ‘db’, ‘_table/event’)",
"|",
"|#9 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(17384):",
"|----> DreamFactory\Http\Controllers\RestController->handleService(‘v2’, ‘db’, ‘_table/event’)",
"|",
"|#10 [internal function]: DreamFactory\Http\Controllers\RestController->handleGET(‘v2’, ‘db’, ‘_table/event’)",
"|",
"|#11 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(8761):",
"|----> call_user_func_array(Array, Array)",
"|",
"|#12 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(8830):",
"|----> Illuminate\Routing\Controller->callAction(‘handleGET’, Array)",
"|",
"|#13 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(8810):",
"|----> Illuminate\Routing\ControllerDispatcher->call(Object(DreamFactory\Http\Controllers\RestController), Object(Illuminate\Routing\Route), ‘handleGET’)",
"|",
"|#14 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))",
"|",
"|#15 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9467):",
"|----> call_user_func(Object(Closure), Object(Illuminate\Http\Request))",
"|",
"|#16 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(17792):",
"|----> Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))",
"|",
"|#17 [internal function]: Dreamfactory\Http\Middleware\Limits->handle(Object(Illuminate\Http\Request), Object(Closure))",
"|",
"|#18 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9459):",
"|----> call_user_func_array(Array, Array)",
"|",
"|#19 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(17688):",
"|----> Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))",
"|",
"|#20 [internal function]: DreamFactory\Http\Middleware\AccessCheck->handle(Object(Illuminate\Http\Request), Object(Closure))",
"|",
"|#21 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9459):",
"|----> call_user_func_array(Array, Array)",
"|",
"|#22 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))",
"|",
"|#23 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9449):",
"|----> call_user_func(Object(Closure), Object(Illuminate\Http\Request))",
"|",
"|#24 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(8811):",
"|----> Illuminate\Pipeline\Pipeline->then(Object(Closure))",
"|",
"|#25 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(8796):",
"|----> Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(DreamFactory\Http\Controllers\RestController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), ‘handleGET’)",
"|",
"|#26 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7750):",
"|----> Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), ‘DreamFactory\\Ht…’, ‘handleGET’)",
"|",
"|#27 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7721):",
"|----> Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))",
"|",
"|#28 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7374):",
"|----> Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))",
"|",
"|#29 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))",
"|",
"|#30 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9467):",
"|----> call_user_func(Object(Closure), Object(Illuminate\Http\Request))",
"|",
"|#31 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))",
"|",
"|#32 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9449):",
"|----> call_user_func(Object(Closure), Object(Illuminate\Http\Request))",
"|",
"|#33 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7375):",
"|----> Illuminate\Pipeline\Pipeline->then(Object(Closure))",
"|",
"|#34 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7363):",
"|----> Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))",
"|",
"|#35 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(7348):",
"|----> Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))",
"|",
"|#36 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2262):",
"|----> Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))",
"|",
"|#37 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))",
"|",
"|#38 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9467):",
"|----> call_user_func(Object(Closure), Object(Illuminate\Http\Request))",
"|",
"|#39 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/vendor/barryvdh/laravel-cors/src/HandleCors.php(43):",
"|----> Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))",
"|",
"|#40 [internal function]: Barryvdh\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure))",
"|",
"|#41 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9459):",
"|----> call_user_func_array(Array, Array)",
"|",
"|#42 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(17771):",
"|----> Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))",
"|",
"|#43 [internal function]: DreamFactory\Http\Middleware\FirstUserCheck->handle(Object(Illuminate\Http\Request), Object(Closure))",
"|",
"|#44 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9459):",
"|----> call_user_func_array(Array, Array)",
"|",
"|#45 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(12755):",
"|----> Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))",
"|",
"|#46 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))",
"|",
"|#47 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9459):",
"|----> call_user_func_array(Array, Array)",
"|",
"|#48 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(11390):",
"|----> Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))",
"|",
"|#49 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))",
"|",
"|#50 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9459):",
"|----> call_user_func_array(Array, Array)",
"|",
"|#51 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(12496):",
"|----> Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))",
"|",
"|#52 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))",
"|",
"|#53 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9459):",
"|----> call_user_func_array(Array, Array)",
"|",
"|#54 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(12435):",
"|----> Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))",
"|",
"|#55 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))",
"|",
"|#56 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9459):",
"|----> call_user_func_array(Array, Array)",
"|",
"|#57 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2932):",
"|----> Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))",
"|",
"|#58 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))",
"|",
"|#59 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9459):",
"|----> call_user_func_array(Array, Array)",
"|",
"|#60 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))",
"|",
"|#61 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9449):",
"|----> call_user_func(Object(Closure), Object(Illuminate\Http\Request))",
"|",
"|#62 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2209):",
"|----> Illuminate\Pipeline\Pipeline->then(Object(Closure))",
"|",
"|#63 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2192):",
"|----> Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))",
"|",
"|#64 /Applications/dreamfactory-2.0.beta-2/apps/dreamfactory/htdocs/public/index.php(53):",
"|----> Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))",
"|",
"|#65 {main}"
]
}
}

In the admin console go to the Config tab and Flush the system cache.

Reload the admin console in your browser.

Then go back to the Schema tab and see if your table is there.

If you are having trouble building schema with the UI try importing the entire schema as JSON from the schema tab.

Yeah, well, after doing that, it shows up as a table in the schema section, but it won’t let me set it as a service in the data section - gives the error “Table “event” does not exist in the database.” Get same message as above when I try to createRecord() using the JSON in the api docs section. So it sometimes thinks the table is there, until I want to write to it.

In case it helps, here is the apparently valid JSON that is associated with that table in the schema section

{
“name”: “event”,
“is_view”: false,
“label”: “event”,
“plural”: “events”,
“description”: null,
“alias”: “event”,
“field”: [
{
“name”: “example_field”,
“label”: “Example Field”,
“description”: null,
“type”: “string”,
“db_type”: “varchar(255)”,
“length”: 255,
“precision”: null,
“scale”: null,
“default”: null,
“required”: true,
“allow_null”: false,
“fixed_length”: false,
“supports_multibyte”: true,
“auto_increment”: false,
“is_primary_key”: false,
“is_foreign_key”: false,
“is_unique”: false,
“is_index”: false,
“ref_table”: null,
“ref_fields”: null,
“picklist”: null,
“validation”: null,
“alias”: null
},
{
“name”: “id”,
“label”: “id”,
“description”: null,
“type”: “integer”,
“db_type”: “int(11)”,
“length”: 11,
“precision”: null,
“scale”: null,
“default”: null,
“required”: false,
“allow_null”: false,
“fixed_length”: false,
“supports_multibyte”: false,
“auto_increment”: true,
“is_primary_key”: true,
“is_foreign_key”: false,
“is_unique”: false,
“is_index”: false,
“ref_table”: null,
“ref_fields”: null,
“picklist”: null,
“validation”: null,
“alias”: “id”
}
],
“related”: [],
“primary_key”: “id”,
“name_field”: null,
“access”: 31
}

Did you find a solution to this? I’m having the same problem.

E.g. the system table listed also in the schema works but not the table I’ve created.
The db is sql server.