question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrations do not contain column definitions

See original GitHub issue

Using MySQL Workbench latest (6.3.9) on Windows 10 and the latest version of the script on master the generated migrations do not contain any column definitions.

With the MWB file linked here: https://dl.dropboxusercontent.com/u/12420042/test.mwb (which is just a simple test with a single table with a PK and varchar field) the resulting migration is:

<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTracksTable extends Migration
{
    /**
     * Run the migrations.
     * @table tracks
     *
     * @return void
     */
    public function up()
    {
        Schema::create('tracks', function (Blueprint $table) {
            $table->engine = 'InnoDB';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
     public function down()
     {
       Schema::dropIfExists('tracks');
     }
}

I thought that maybe the MWB application version was too new so tried downgrading from 6.3.8 progressively to 6.3.5 but the migration generated was the same in each version. So either there’s a bug or I’m missing something obvious on my end.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rmontananacommented, Mar 13, 2017

Same here, hope this helps. Mac OS Sierra 10.12.3 & MySQL Workbench 6.3.8 Community 64 bits. issue

0reactions
beckenrodecommented, Aug 21, 2017

Closing; Fixed in #43

Read more comments on GitHub >

github_iconTop Results From Across the Web

EF core migration - Class does not contain a definition of ...
I have asp.net core application build on 1.0.0-rtm-21431 version which i updated to 1.1.2 and successfully deploy on azure.
Read more >
Avoiding downtime in migrations - GitLab Docs
If a column contains one or more indexes that don't contain the name of the original column, the previously described procedure fails.
Read more >
Active Record Migrations - Rails Edge Guides
These special columns are automatically managed by Active Record if they exist. Note that we define the change that we want to happen...
Read more >
Database: Migrations - The PHP Framework For Web Artisans
Migration Structure​​ A migration class contains two methods: up and down . The up method is used to add new tables, columns, or...
Read more >
Migrations - Drift - Simon Binder
Deleting a column that's not referenced by a foreign key constraint is easy too: await m.alterTable(TableMigration(yourTable));. To delete a column referenced ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found