Skip to content

->float('foo') is creating a double column? #21827

Closed
@Jakobud

Description

@Jakobud
  • Laravel Version: 5.5.18
  • PHP Version: PHP 7.1.10-1+ubuntu16.04.1+deb.sury.org+1
  • Database Driver & Version: 5.7.19-0ubuntu0.16.04.1 (Ubuntu)

(This is using the latest Laravel Homestead)

Description:

When I create a migration that uses this:

$table->float('population')->unsigned()->default(0);

It creates a double (8,2) column in the database. Why isn't it a FLOAT type?

Steps To Reproduce:

Use $table->float('population')->unsigned()->default(0); in a migration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions