Skip to content

[5.8] Added SET datatype on MySQL Grammar#28171

Merged
taylorotwell merged 2 commits into
laravel:5.8from
jpedroh:5.8
Apr 11, 2019
Merged

[5.8] Added SET datatype on MySQL Grammar#28171
taylorotwell merged 2 commits into
laravel:5.8from
jpedroh:5.8

Conversation

@jpedroh

@jpedroh jpedroh commented Apr 10, 2019

Copy link
Copy Markdown
Contributor

This pull request adds the MySQL's SET type into the migrations builder. It allows you to make:

    public function up()
    {
        Schema::create('table_name', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->set("field_name", [ "Possible", "Values" ]);
            $table->timestamps();
        });
    }

That will create a table with a field_name column with the SET dataType. Available only on MySQL.

@jpedroh jpedroh changed the title Added SET datatype on MySQL Grammar [5.8] Added SET datatype on MySQL Grammar Apr 10, 2019
Comment thread tests/Database/DatabaseMySqlSchemaGrammarTest.php Outdated
@taylorotwell taylorotwell merged commit 46884ad into laravel:5.8 Apr 11, 2019
@huangdijia

Copy link
Copy Markdown
Contributor

before this, I use https://github.com/huangdijia/laravel-blueprint-extend-set for support set type

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

Successfully merging this pull request may close these issues.

4 participants