Vinelab / NeoEloquent

The Neo4j OGM for Laravel
MIT License
636 stars 200 forks source link

Neo4J Laravel Migration Creates DummyTable #245

Closed axelthat closed 4 years ago

axelthat commented 7 years ago

When i make migration using php artisan neo4j:make create_user_label --create=User it creates dummy table with Schema but i want is it to create Neo4J Schema instead of Dummy Table. Please Help me. Makes this:


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

class DummyClass extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('DummyTable', function (Blueprint $table) {
            //
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('DummyTable', function (Blueprint $table) {
            //
        });
    }
}

Want this:

use Vinelab\NeoEloquent\Schema\Blueprint;
use Vinelab\NeoEloquent\Migrations\Migration;
class CreateTestpostsTable extends Migration {
/**
 * Run the migrations.
 *
 * @return void
 */
public function up()
{
    Neo4jSchema::label('Testposts', function(Blueprint $label)
    {
         //
    });
}
/**
 * Reverse the migrations.
 *
 * @return void
 */
public function down()
{
    Neo4jSchema::drop('Testposts');   
}

}

Please Help

JVTT commented 7 years ago

I have also noticed this happening when I run neo4j:make:migration create_label_name. Seems pretty bad. Also, could you reformat the issue to make it look more like this? (Use 4 spaces instead of the backticks.)

<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
//etc
Mulkave commented 6 years ago

Is this still valid after https://github.com/Vinelab/NeoEloquent/pull/255?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.