{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/22908","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/22908/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/22908/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/22908/events","html_url":"https://github.com/laravel/framework/issues/22908","id":291300146,"number":22908,"title":"Error changing timestamp column in PostgreSQL","user":{"login":"antonioribeiro","id":3182864,"avatar_url":"https://avatars3.githubusercontent.com/u/3182864?v=4","gravatar_id":"","url":"https://api.github.com/users/antonioribeiro","html_url":"https://github.com/antonioribeiro","followers_url":"https://api.github.com/users/antonioribeiro/followers","following_url":"https://api.github.com/users/antonioribeiro/following{/other_user}","gists_url":"https://api.github.com/users/antonioribeiro/gists{/gist_id}","starred_url":"https://api.github.com/users/antonioribeiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonioribeiro/subscriptions","organizations_url":"https://api.github.com/users/antonioribeiro/orgs","repos_url":"https://api.github.com/users/antonioribeiro/repos","events_url":"https://api.github.com/users/antonioribeiro/events{/privacy}","received_events_url":"https://api.github.com/users/antonioribeiro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-01-24T17:46:17Z","updated_at":"2018-05-03T12:11:54Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"- Laravel Version: v5.5.31\r\n- PHP Version: 7.1.4\r\n- Database Driver & Version: PostgreSQL \r\n\r\n### Description:\r\n\r\nCannot alter a timestamp table from not null to nullable, Doctrine raises this exception:\r\n\r\n```\r\nUnknown column type \"timestamp\" requested. \r\nAny Doctrine type that you use has to be registered with \\Doctrine\\DBAL\\Types\\Type::addType(). \r\nYou can get a list of all the known types with \\Doctrine\\DBAL\\Types\\Type::getTypesMap(). \r\nIf this error occurs during database introspection then you might have forgotten to register all database types for a Doctrine Type. \r\nUse AbstractPlatform#registerDoctrineTypeMapping() or have your custom types implement Type#getMappedDatabaseTypes(). \r\nIf the type name is empty you might have a problem with the cache or forgot some mapping information.\r\n```\r\n\r\n### Steps To Reproduce:\r\n\r\nCreate a table using pgsql driver:\r\n\r\n```\r\nSchema::create('processos', function (Blueprint $table) {\r\n    $table->increments('id');\r\n\r\n    $table->timestamp('date_column_name');\r\n\r\n    $table->timestamps();\r\n});\r\n```\r\n\r\nThen alter the table:\r\n\r\n```\r\nSchema::table('processos', function (Blueprint $table) {\r\n    $table->timestamp('date_column_name')->nullable()->change();\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/386274474","html_url":"https://github.com/laravel/framework/issues/22908#issuecomment-386274474","issue_url":"https://api.github.com/repos/laravel/framework/issues/22908","id":386274474,"user":{"login":"emilv","id":1684914,"avatar_url":"https://avatars0.githubusercontent.com/u/1684914?v=4","gravatar_id":"","url":"https://api.github.com/users/emilv","html_url":"https://github.com/emilv","followers_url":"https://api.github.com/users/emilv/followers","following_url":"https://api.github.com/users/emilv/following{/other_user}","gists_url":"https://api.github.com/users/emilv/gists{/gist_id}","starred_url":"https://api.github.com/users/emilv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emilv/subscriptions","organizations_url":"https://api.github.com/users/emilv/orgs","repos_url":"https://api.github.com/users/emilv/repos","events_url":"https://api.github.com/users/emilv/events{/privacy}","received_events_url":"https://api.github.com/users/emilv/received_events","type":"User","site_admin":false},"created_at":"2018-05-03T12:11:54Z","updated_at":"2018-05-03T12:11:54Z","author_association":"NONE","body":"The problem is the use of the TIMESTAMP type in the database instead of DATETIME. You can read more about this topic here: https://github.com/doctrine/dbal/issues/2558\r\n\r\nYour solution changes the type of the column, which might have unintended side-effects. But DATETIME is a better type anyway in most cases."}}
{"actor":{"display_login":"emilv"}}