|
@@ -15,23 +15,15 @@ class CreateTeachersTable extends Migration
|
|
|
{
|
|
|
Schema::create('teachers', function (Blueprint $table) {
|
|
|
$table->bigIncrements('id');
|
|
|
- $table->string('login');
|
|
|
- $table->string('password');
|
|
|
- $table->string('avatar');
|
|
|
- $table->string('fio');
|
|
|
- $table->string('duty');
|
|
|
- $table->string('workplace');
|
|
|
- $table->string('email');
|
|
|
- $table->string('country');
|
|
|
- $table->string('city');
|
|
|
- $table->string('phone', 20);
|
|
|
- $table->string('education_place');
|
|
|
- $table->unsignedBigInteger('user_id');
|
|
|
- $table->unsignedBigInteger('courses_id');
|
|
|
- $table->string('api_token')->nullable();
|
|
|
+ $table->string('name');
|
|
|
+ $table->string('grade')->nullable();
|
|
|
+ $table->string('phone', 20)->nullable();
|
|
|
+ $table->string('email')->nullable();
|
|
|
+ $table->unsignedBigInteger('organisation_id')->nullable();
|
|
|
+ $table->unsignedBigInteger('courses_id')->nullable();
|
|
|
$table->timestamps();
|
|
|
-
|
|
|
- $table->foreign('user_id')->on('users')->references('id');
|
|
|
+ $table->foreign('organisation_id')->on('organisations')->references('id');
|
|
|
+ $table->foreign('courses_id')->on('courses')->references('id');
|
|
|
});
|
|
|
}
|
|
|
|