can not run migration


  • Web Development

    public function up()
    {
        Schema::create('registerusers', function (Blueprint $table) {
            $table->increments('id');
            $table->string('firstname', 10);
            $table->string('lastname', 20);
            $table->integer('phone', 10);
            $table->string('email')->unique();
            $table->string('gender');
            $table->string('vehiclemodel');
            $table->string('platenum', 6);
            $table->timestamps();
        });
    }
    

    Erroris : Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key


  • Web Development

    othana tiyena integer eka unsigned karana

    $table->integer('phone',10)->unsigned();


  • Web Development

    SQLSTATE[HY000]: General error: 1364 Field 'username' doesn't have a default value (SQL: insert into registerusers (updated_at, created_at) values (2019-07-15 12:03:06, 2019-07-15 12:03:06))
    menna me error eka enwa, data base ekata data sav krnna giama.

    public function storeRegister(Request $request)
    {
    $registeruser = new registeruser;
    $request->all();
    $registeruser->save();
    }



  • username kyna field ekata value ekak naha kyla kyanne


  • Web Development

    @hashan row sql use krane ai mchan , Laravel ORM eka use karana


Log in to reply