feat(profile,publications): integrate working Google Scholar import flow and unified faculty profile system
This commit is contained in:
@@ -34,8 +34,8 @@ return new class extends Migration
|
||||
$table->timestamps();
|
||||
});
|
||||
// Add ISSN format check constraint manually
|
||||
DB::statement("ALTER TABLE books_published ADD CONSTRAINT chk_issn_format CHECK (issn REGEXP '^[0-9]{4}-[0-9]{3}[0-9X]$')");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->string('scholar_url')->nullable()->after('scopus_id');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('scholar_url');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('publications', function (Blueprint $table) {
|
||||
$table->string('organizing_institute')->nullable()->change();
|
||||
$table->string('venue_address')->nullable()->change();
|
||||
$table->string('affiliation')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('publications', function (Blueprint $table) {
|
||||
$table->string('organizing_institute')->nullable(false)->change();
|
||||
$table->string('venue_address')->nullable(false)->change();
|
||||
$table->string('affiliation')->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
45
database/migrations/create_faculty_profiles_table.php
Normal file
45
database/migrations/create_faculty_profiles_table.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('faculty_profiles', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')->constrained()->onDelete('cascade');
|
||||
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->string('phone_number')->nullable();
|
||||
$table->string('vidhvan_id');
|
||||
$table->string('google_scholar_id');
|
||||
$table->string('linkedin_id')->nullable();
|
||||
$table->string('designation')->nullable();
|
||||
$table->string('salutation');
|
||||
$table->json('qualification')->nullable(); // multiple quals
|
||||
$table->text('address')->nullable();
|
||||
$table->string('employee_id');
|
||||
$table->string('department_name');
|
||||
$table->string('programme_name');
|
||||
$table->date('date_of_joining');
|
||||
$table->string('profile_photo_path')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('faculty_profiles');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user