ForestAdmin / laravel-forestadmin

🌱 Laravel Agent for Forest Admin
GNU General Public License v3.0
73 stars 16 forks source link

Undefined array key "timestamp" #54

Closed storm23 closed 2 years ago

storm23 commented 2 years ago

Expected behavior

Handle "timestamp" type columns.

Actual behavior

Failed on error : Undefined array key "timestamp"

Failure Logs

ErrorException 

  Undefined array key "timestamp"

  at vendor/forestadmin/laravel-forestadmin/src/Schema/Concerns/DataTypes.php:53
     49▕      * @return string
     50▕      */
     51▕     public function getType(string $dbType): string
     52▕     {
  ➜  53▕         return $this->dbTypes[$dbType];
     54▕     }
     55▕ }
     56▕ 

      +12 vendor frames 
  13  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()

Context

Try to launch server with ForestAdmin for Laravel package. Mysql DB contains several table with columns of type "TIMESTAMP" (like created_at and updated_at columns).

nicolasalexandre9 commented 2 years ago

Hi @storm23, I’m not able to reproduce the problem on my end. What is your MYSQL version?

nicolasalexandre9 commented 2 years ago

Issue resolved in this topic https://community.forestadmin.com/t/timestamp-column-type-not-handled-by-laravel-package/4866/7