Skip to content

PostgreSQL error in timestamps(Datetime field overflow) #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nilsenj opened this issue Mar 6, 2016 · 2 comments
Open

PostgreSQL error in timestamps(Datetime field overflow) #1

nilsenj opened this issue Mar 6, 2016 · 2 comments

Comments

@nilsenj
Copy link

nilsenj commented Mar 6, 2016

php artisan migrate

[Illuminate\Database\QueryException]
SQLSTATE[22008]: Datetime field overflow: 7 ERROR: date/time field value out of range: "0000-00-00 00:0
0:00" (SQL: create table "crms" ("id" serial primary key not null, "crm_name" varchar(255) not null, "cr
m_description" varchar(255) null, "url" varchar(255) not null, "request_type" varchar(10) not null defau
lt 'POST', "parameters" text null, "data_format" varchar(255) not null default 'JSON', "data_mapper" var
char(255) null, "last_upload" timestamp(0) without time zone not null default '0000-00-00 00:00:00', "la
st_download" timestamp(0) without time zone not null default '0000-00-00 00:00:00', "extended_data" text
null, "created_at" timestamp(0) without time zone not null, "updated_at" timestamp(0) without time zone
not null, "deleted_at" timestamp(0) without time zone null))

[PDOException]
SQLSTATE[22008]: Datetime field overflow: 7 ERROR: date/time field value out of range: "0000-00-00 00:0
0:00"

@nilsenj
Copy link
Author

nilsenj commented Mar 6, 2016

possible fix
instead of default timestamp value
use ->nullable() method

not tested

@delatbabel
Copy link
Owner

I have pushed a change making the date fields nullable. Pull from the dev-master branch and let me know if that works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants