cleanup & setting up sync update

This commit is contained in:
2025-03-24 17:19:51 +03:00
parent a2ce9248f0
commit 22473c8f3f
13650 changed files with 507 additions and 1947259 deletions
@@ -1,53 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('first_name');
$table->string('last_name');
$table->string('username')->unique();
$table->string('phone')->nullable();
$table->smallInteger('position_id')->nullable();
$table->string('photo')->nullable();
$table->boolean('council_registration')->default(0);
$table->smallInteger('council_id')->nullable();
$table->string('registration_number')->nullable();
$table->date('expiry_date')->nullable();
$table->string('email')->unique()->nullable();
$table->string('pin', 15);
$table->boolean('willing_to_donate')->default(1);
$table->smallInteger('blood_group_id')->nullable();
$table->date('last_donation_date')->nullable();
$table->smallInteger('security_question_id')->nullable();
$table->string('security_answer')->nullable();
$table->string('password');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamp('last_login_at')->nullable();
$table->softDeletes();
$table->timestamps();
$table->rememberToken();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('users');
}
}
@@ -1,32 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePasswordResetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password_resets', function (Blueprint $table) {
$table->string('email')->index();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('password_resets');
}
}
@@ -1,66 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePatientsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('patients', function (Blueprint $table) {
$table->increments("id");
$table->string("number")->unique()->comment("Same as the patient_id but with a prefix")->nullable();
$table->string("first_name");
$table->string("last_name");
$table->date("date_of_birth")->nullable();
$table->smallInteger("gender")->comment("1 = Male , 2 = Female , 3 = Other")->nullable();
$table->smallInteger("marital_status")->comment("1 = single, 2 = Married, 3 = Divorced, 4 = Other")->nullable();
$table->smallInteger("occupation_id")->nullable();
$table->string("phone", 10)->nullable();
$table->longtext('photo')->nullable();
$table->string("national_id", 15)->unique()->nullable();
$table->string("phone_owner")->nullable();
$table->boolean("insurance_status")->default(0);
$table->smallinteger("category_id")->nullable();
$table->smallInteger("religion_id")->nullable();
$table->char("language", 4)->default('vern');
$table->string('next_of_kin')->nullable();
$table->smallInteger('next_of_kin_relationship')->nullable();
$table->string('phone_of_next_of_kin')->nullable();
$table->string('lc_one')->nullable();
$table->string('hospital_contact')->nullable();
$table->string('hospital_contact_name')->nullable();
$table->integer('district_id')->nullable();
$table->integer('county_id')->nullable();
$table->integer('subcounty_id')->nullable();
$table->integer('parish_id')->nullable();
$table->integer('village_id')->nullable();
$table->integer('parent_id')->nullable();
$table->string('children_id')->nullable();
$table->string('citizenship')->nullable();
$table->string('country_id')->nullable();
$table->string('address_details')->nullable();
$table->integer("created_by");
$table->integer("updated_by")->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('patients');
}
}
@@ -1,36 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateOccupationsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('occupations', function($table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('occupations');
}
}
@@ -1,34 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateInvestigationCategoriesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('investigation_categories', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 50)->unique();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('investigation_categories');
}
}
@@ -1,40 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateChartOfAccountsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('chart_of_accounts', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 50)->unique();
$table->integer('type')->default(0);
$table->string('description', 50)->nullable();
$table->integer('sub_account_of')->nullable();
$table->integer('balance');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('chart_of_accounts');
}
}
@@ -1,39 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAccountTypeTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('account_types', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 50)->unique();
$table->string('description', 50)->nullable();
$table->integer('active')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('account_types');
}
}
@@ -1,38 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateHmisCategoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('hmis_categories', function (Blueprint $table) {
$table->increments('id');
$table->string('number', 10)->nullable();
$table->string('title', 100)->unique();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('hmis_categories');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUnitOfMeasureTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create("unit_of_measure", function(Blueprint $table) {
$table->increments("id");
$table->string("name");
$table->integer("created_by");
$table->integer("updated_by");
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists("unit_of_measure");
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAgeGroupsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create("age_groups", function(Blueprint $table) {
$table->increments("id");
$table->string("name");
$table->integer("created_by")->nullable();
$table->integer("updated_by")->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists("age_groups");
}
}
@@ -1,55 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateResourcesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
Schema::create('resources', function (Blueprint $table) {
$table->increments('id');
$table->string('title',90);
$table->string('body',500)->nullable();
$table->text('attach_path');
$table->integer('category_id');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->integer('active')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
Schema::create('resource_categories' , function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('active')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('resources');
Schema::dropIfExists('resource_categories');
}
}
@@ -1,36 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateReligionsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create("religions", function(Blueprint $table) {
$table->increments('id');
$table->string("name");
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists("religions");
}
}
@@ -1,50 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateHospitalInformationTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create("hospital_information", function(Blueprint $table) {
$table->increments("id");
$table->string("name", 100)->nullable();
$table->string("email", 100)->nullable();
$table->string("website", 100)->nullable();
$table->string("phone_number", 25)->nullable();
$table->string("app_name", 25)->nullable();
$table->float("app_version", 2, 1)->nullable();
$table->longtext("logo")->nullable();
$table->string("address")->nullable();
$table->string("level", 50)->nullable();
$table->string("code", 50)->nullable();
$table->string("country", 50)->nullable();
$table->integer("district")->nullable();
$table->integer("parish")->nullable();
$table->integer("sub_county")->nullable();
$table->string("sub_district", 45)->nullable();
$table->string("patient_number_abbr", 5)->nullable();
$table->integer("updated_by")->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists("hospital_information");
}
}
@@ -1,36 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMaritalStatusTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create("marital_statuses", function(Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('marital_statuses');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateDepartmentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('departments', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 100)->unique();
$table->integer('created_by');
$table->integer('updated_by');
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('departments');
}
}
@@ -1,38 +0,0 @@
M<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMessageBoardTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('message_board', function (Blueprint $table) {
$table->increments('id');
$table->text('body');
$table->longtext('photo')->nullable();
$table->integer('created_by')->default(0);
$table->integer('updated_by')->default(0);
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('message_board');
}
}
@@ -1,42 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateServiceDepositsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up(){
Schema::create("service_deposits", function(Blueprint $table) {
$table->increments("id");
$table->integer("patient_id");
$table->integer("episode_id");
$table->text("items_ids");
$table->text("items_amounts");
$table->integer("patient_amount_paid")->nullable();
$table->integer('debt_plan_active')->nullable();
$table->string("service_type");
$table->string("receipt_number");
$table->integer("created_by");
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists("service_deposits");
}
}
@@ -1,52 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTriageTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('triage', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id');
$table->text('symptoms')->nullable();
$table->text('symptom_duration')->nullable();
$table->text('observations')->nullable();
$table->tinyInteger('severe_grade')->comment("1 = green, 2 = yellow, 3 = red");
$table->smallInteger('clinic_allocation')->nullable();
$table->text('comments')->nullable();
$table->boolean('sexually_active')->nullable()->comment("1 = active, 0 = inactive");
$table->boolean('pregnant')->nullable()->comment("1 = active, 0 = inactive");
$table->boolean('menopause')->nullable()->comment("1 = active, 0 = inactive");
$table->tinyInteger('fp_method')->nullable();
$table->string('fp_action', 25)->nullable();
$table->boolean('fp_too_sick')->nullable()->comment("1 = active, 0 = inactive");
$table->boolean('new_attendance')->nullable()->comment("1 = active, 0 = inactive");
$table->boolean('re_attendance')->nullable()->comment("1 = active, 0 = inactive");
$table->integer('referral')->default(1)->comment("1 = self");
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('triage');
}
}
@@ -1,42 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePatientEpisodesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('patient_episodes', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('clinic_id')->nullable();
$table->integer('triage_id')->nullable();
$table->integer('consultation_id')->nullable();
$table->integer('treatment_id')->nullable();
$table->boolean('co_payment')->default(0)->comment("1 = paid, 0 = not_paid");
$table->integer('created_by')->default(0);
$table->integer('updated_by')->default(0);
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('patient_episodes');
}
}
@@ -1,100 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Schema;
class CreatePermissionTables extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
$tableNames = config('permission.table_names');
Schema::create($tableNames['permissions'], function (Blueprint $table) {
$table->increments('id');
$table->string('name')->unique();
$table->integer('permission_category_id')->default(0);
$table->string('description')->nullable();
$table->string('guard_name');
$table->string('crud', 6);
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
Schema::create($tableNames['roles'], function (Blueprint $table) {
$table->increments('id');
$table->string('name')->unique();
$table->string('guard_name');
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames) {
$table->integer('permission_id')->unsigned();
$table->morphs('model');
$table->foreign('permission_id')
->references('id')
->on($tableNames['permissions'])
->onDelete('cascade');
$table->primary(['permission_id', 'model_id', 'model_type']);
});
Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames) {
$table->integer('role_id')->unsigned();
$table->morphs('model');
$table->foreign('role_id')
->references('id')
->on($tableNames['roles'])
->onDelete('cascade');
$table->primary(['role_id', 'model_id', 'model_type']);
});
Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) {
$table->integer('permission_id')->unsigned();
$table->integer('role_id')->unsigned();
$table->foreign('permission_id')
->references('id')
->on($tableNames['permissions'])
->onDelete('cascade');
$table->foreign('role_id')
->references('id')
->on($tableNames['roles'])
->onDelete('cascade');
$table->primary(['permission_id', 'role_id']);
Cache::forget('spatie.permission.cache');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
$tableNames = config('permission.table_names');
Schema::drop($tableNames['role_has_permissions']);
Schema::drop($tableNames['model_has_roles']);
Schema::drop($tableNames['model_has_permissions']);
Schema::drop($tableNames['roles']);
Schema::drop($tableNames['permissions']);
}
}
@@ -1,42 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateServicesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up(){
Schema::create('services', function (Blueprint $table) {
$table->increments('id');
$table->string('name')->nullable();
$table->integer('cost_price')->nullable();
$table->integer('non_insured_price')->nullable();
$table->integer('insured_price')->nullable();
$table->string('description')->nullable();
$table->integer('supplier_id');
$table->integer('insurance_coverage')->nullable();
$table->integer('account_id');
$table->string('item_type');
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('services');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateStaffPositionsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('staff_positions', function (Blueprint $table) {
$table->increments('id');
$table->string('name')->unique();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->integer('active')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('staff_positions');
}
}
@@ -1,36 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateLicenceCouncilsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('licence_councils', function (Blueprint $table) {
$table->increments('id');
$table->string('name')->unique();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('licence_councils');
}
}
@@ -1,36 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateBloodGroupsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('blood_groups', function (Blueprint $table) {
$table->increments('id');
$table->string('name')->unique();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('blood_groups');
}
}
@@ -1,49 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateConsultationsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('consultations', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id');
$table->integer('primary_diagnosis')->nullable();
$table->string('other_diagnoses')->nullable();
$table->text('comments')->nullable();
$table->smallInteger('outcome_id')->nullable();
$table->string('followup_where')->nullable();
$table->date('followup_when')->nullable();
$table->smallInteger('referred_to')->nullable();
$table->smallInteger('ward_id')->nullable();
$table->date('admitted_on')->nullable();
$table->boolean('rdt')->nullable();
$table->string('rbs')->nullable();
$table->boolean('completed')->default(0);
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('consultations');
}
}
@@ -1,49 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTemporaryConsultationsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('temporary_consultations', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id');
$table->integer('primary_diagnosis')->nullable();
$table->text('other_diagnoses')->nullable();
$table->text('comments')->nullable();
$table->smallInteger('outcome_id')->nullable();
$table->smallInteger('ward_id')->nullable();
$table->date('admitted_on')->nullable();
$table->string('followup_where')->nullable();
$table->date('followup_when')->nullable();
$table->smallInteger('referred_to')->nullable();
$table->boolean('rdt')->nullable();
$table->string('rbs')->nullable();
$table->boolean('status')->default(0)->comment('0 is Pending, 1 is Completed');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('temporary_consultations');
}
}
@@ -1,36 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateOutcomesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('outcomes', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('outcomes');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFamilyPlanningMethodsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('family_planning_methods', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 50)->unique();
$table->integer('created_by')->default(0);
$table->integer('updated_by')->default(0);
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('family_planning_methods');
}
}
@@ -1,46 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTriageNewsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('triage_news', function (Blueprint $table) {
$table->increments('id');
$table->integer('triage_id');
$table->integer('episode_id');
$table->integer('patient_id');
$table->integer('temperature')->nullable();
$table->integer('heart_rate')->nullable();
$table->integer('respiration_rate')->nullable();
$table->integer('oxygen_saturations')->nullable();
$table->integer('systolic_bp')->nullable();
$table->integer('conscious_level')->nullable();
$table->integer('supplementary_oxygen')->nullable();
$table->integer('created_by')->default(0);
$table->integer('updated_by')->default(0);
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('triage_news');
}
}
@@ -1,43 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEmergencySignsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('emergency_signs', function (Blueprint $table) {
$table->increments('id');
$table->text('airway');
$table->text('circulation');
$table->text('neurological');
$table->text('dehydration');
$table->integer('patient_id');
$table->integer('triage_id');
$table->integer('episode_id');
$table->integer('created_by')->default(0);
$table->integer('updated_by')->default(0);
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('emergency_signs');
}
}
@@ -1,40 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePrioritySignsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('priority_signs', function (Blueprint $table) {
$table->increments('id');
$table->text('signs');
$table->integer('triage_id');
$table->integer('patient_id');
$table->integer('episode_id');
$table->integer('created_by')->default(0);
$table->integer('updated_by')->default(0);
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('priority_signs');
}
}
@@ -1,41 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePatientDocumentsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('patient_documents', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id')->nullable();
$table->string('title')->nullable();
$table->text('description')->nullable();
$table->text('path')->nullable();
$table->date('date_taken')->nullable();
$table->integer('created_by')->nullable();
$table->integer('úpdated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('patient_documents');
}
}
@@ -1,59 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateInpatientInfoTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('inpatient_info', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id');
$table->date('admitted_on')->nullable();
$table->smallInteger('ward_id')->nullable();
$table->smallInteger('outcome_id')->nullable();
$table->string('followup_where')->nullable();
$table->date('followup_when')->nullable();
$table->smallInteger('referred_to')->nullable();
$table->string('procedures')->nullable();
$table->string('sundries')->nullable();
$table->string('tta')->nullable();
$table->string('extras')->nullable();
$table->text('comments')->nullable();
$table->boolean('procedure_payment')->default(0)->nullable();
$table->integer('primary_diagnosis')->nullable();
$table->string('other_diagnoses')->nullable();
$table->string('ward_treatments')->nullable();
$table->text('ward_message')->nullable();
$table->integer('bed_category_id')->nullable();
$table->integer('speciality_id')->nullable();
$table->string('bed_no', 6)->nullable();
$table->boolean('discharged')->default(0);
$table->date('discharged_on')->nullable();
$table->integer('discharged_by')->nullable();
$table->boolean('transferred')->default(0);
$table->tinyInteger('payment_status')->default(0);
$table->integer('created_by');
$table->integer('updated_by')->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('inpatient_info');
}
}
@@ -1,69 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateInventoryItemsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('inventory_items', function (Blueprint $table) {
$table->increments('id');
$table->string('item_name');
$table->integer('cost_price')->nullable();
$table->integer('selling_price')->nullable();
$table->integer('quantity')->nullable();
$table->integer('reorder_level')->nullable();
$table->string('description')->nullable();
$table->string('drug_form')->nullable();
$table->string('drug_unit')->nullable();
$table->integer('item_category_id')->nullable();
$table->integer('supplier_id')->nullable();
$table->text('prompt')->nullable();
$table->string('patient_info_local')->nullable();
$table->text('patient_info')->nullable();
$table->text('reference_areas')->nullable();
$table->string('reference_name')->nullable();
$table->string('insurance_coverage',3)->nullable();
$table->string('drug_category')->nullable();
$table->integer('account_id')->nullable();
$table->string('item_type')->nullable();
$table->string('comment')->nullable();
$table->string('restricted_prescribing')->nullable();
$table->string('long_term',3)->nullable();
$table->string('pharmacy_stock',11)->nullable();
$table->timestamp('expiry_date')->nullable();
$table->integer('non_insured_amount')->nullable();
$table->float('pricing_factor_adult',11,2)->nullable();
$table->float('ip_adult_daily_cost',11,2)->nullable();
$table->float('pricing_factor_children',11,2)->nullable();
$table->float('ip_paed_daily_cost',11,2)->nullable();
$table->decimal('pack',5,2)->nullable();
$table->decimal('strength',5,2)->nullable();
$table->decimal('pricing_factor_infant',5,2)->nullable();
$table->integer('ip_infant_daily_cost')->nullable();
$table->string('hssip')->nullable();
$table->string('government_essential')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('inventory_items');
}
}
@@ -1,36 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAllergiesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('allergies', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->string('names');
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('allergies');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateChronicPatientsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up(){
Schema::create('chronic_patients', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('drug_id');
$table->integer('episode_id');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down(){
Schema::dropIfExists('chronic_patients');
}
}
@@ -1,35 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePatientDiscountsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up(){
Schema::create('patient_discounts', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_category');
$table->integer('discount')->default(0);
$table->boolean('pay_later')->comment("1 = yes, 0 = no");
$table->integer('created_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down(){
Schema::dropIfExists('patient_discounts');
}
}
@@ -1,41 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateDiscountCategoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up(){
Schema::create('discount_categories', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('discount_type')->comment("1 = Fixed Figure 2 = Patient Ceiling 3 = Patient Top-up");
$table->integer('donor_id');
$table->integer('patient_category');
$table->integer('donor_amount');
$table->integer('patient_amount');
$table->integer('created_by');
$table->integer('updated_by');
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('discount_categories');
}
}
@@ -1,39 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateDebtorsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('debtors', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id');
$table->integer('balance');
$table->string('receipt_number');
$table->integer('tag_id');
$table->integer('payment_status')->default(0)->comment('0 is not cleared, 1 is cleared');
$table->integer('created_by');
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('debtors');
}
}
@@ -1,40 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateDiscountsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up(){
Schema::create('discounts', function (Blueprint $table) {
$table->increments('id');
$table->integer('discount_amount');
$table->integer('patient_id');
$table->integer('episode_id');
$table->integer('patient_category');
$table->string('reason');
$table->string('receipt_number');
$table->integer('created_by');
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('discounts');
}
}
@@ -1,47 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePatientCategoryInvoicesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('patient_category_invoices', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id');
$table->integer('patient_category');
$table->text('items_amounts')->nullable();
$table->text('items_ids')->nullable();
$table->text('items_quantity')->nullable();
$table->text('patient_amount');
$table->string('receipt_number');
$table->integer('tag_id');
$table->integer('status')->default(0)->comment('0 for not cleared and 1 for cleared');
$table->integer('invoice_generated')->default(0)->comment('0 for not generated and 1 for generated');
$table->string('invoice_date');
$table->string('invoice_number')->nullable();
$table->integer('created_by')->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('patient_category_invoices');
}
}
@@ -1,41 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateOrderedProceduresTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ordered_procedures', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id');
$table->text('procedure_id');
$table->integer('payment_status')->comment("1 = Paid , 0 = Unpaid")->default(0);
$table->text('performed')->comment("1 = Yes , 0 = No");
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ordered_procedures');
}
}
@@ -1,41 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateOrderedSundriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ordered_sundries', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id');
$table->text('sundries_id');
$table->text('quantity');
$table->integer('payment_status')->comment("1 = Paid , 0 = Unpaid");
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ordered_sundries');
}
}
@@ -1,48 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateDebtPlanTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('debt_plan', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id');
$table->integer('amount_owed');
$table->date('date_of_bill');
$table->integer('staff_guarantor');
$table->integer('staff_guarantor_to_pay');
$table->integer('debt_plan_arrangement');
$table->date('completion_date');
$table->string('comment')->nullable();
$table->integer('authorised_by');
$table->integer('tag_id');
$table->integer('payment_id')->nullable();
$table->integer('created_by');
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('debt_plan');
}
}
@@ -1,36 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateDebtPlanArrangementsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('debt_plan_arrangements', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('installments');
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('debt_plan_arrangements');
}
}
@@ -1,43 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateDebtPlanPaymentsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('debt_plan_payments', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('amount_owed')->nullable();
$table->integer('amount_paid')->nullable();
$table->integer('balance')->nullable();
$table->text('amount_paid_history')->nullable();
$table->text('date_paid_history')->nullable();
$table->text('staff_in_charge_history')->nullable();
$table->text('comment_history')->nullable();
$table->text('receipt_history')->nullable();
$table->text('balance_history')->nullable();
$table->string('debt_plan_id')->nullable();
$table->integer('created_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::dropIfExists('debt_plan_payments');
}
}
@@ -1,46 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateDebtPlanPaymentStaffsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('debt_plan_payment_staffs', function (Blueprint $table) {
$table->increments('id');
$table->integer('amount_owed')->nullable();
$table->integer('balance')->nullable();
$table->integer('staff_id')->nullable();
$table->string('amount_paid_history')->nullable();
$table->string('date_paid_history')->nullable();
$table->string('staff_in_charge_history')->nullable();
$table->string('comment_history')->nullable();
$table->string('receipt_history')->nullable();
$table->string('balance_history')->nullable();
$table->integer('debt_plan_id')->nullable();
$table->integer('amount_paid')->nullable();
$table->integer('created_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('debt_plan_payment_staffs');
}
}
@@ -1,38 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateParentItemCategoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('parent_item_categories', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('parent_item_categoriescol')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('parent_item_categories');
}
}
@@ -1,38 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateItemCategoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('item_categories', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('parent_item_category_id')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('item_categories');
}
}
@@ -1,45 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFixedAssetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('fixed_assets', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('serial_number')->nullable();
$table->integer('cost_price')->nullable();
$table->date('acquisition_date')->nullable();
$table->string('description')->nullable();
$table->date('warranty_expiration_date')->nullable();
$table->integer('item_condition')->comment('1-new, 0-used')->nullable();
$table->integer('supplier_id')->nullable();
$table->integer('fixed_asset_account_id')->nullable();
$table->integer('bank_account_id')->nullable();
$table->integer('created_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('fixed_assets');
}
}
@@ -1,56 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateQuotationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('quotations', function (Blueprint $table) {
$table->increments('id');
$table->integer('quotation_type_id');
$table->integer('drug_id')->nullable();
$table->double('quantity')->nullable();
$table->date('expected_date')->nullable();
$table->date('quotation_date')->nullable();
$table->integer('quotation_user')->nullable();
$table->integer('bill')->nullable();
$table->date('billing_date')->nullable();
$table->integer('billing_user')->nullable();
$table->tinyInteger('approval_status')->default(0)->nullable();
$table->integer('approval_user')->nullable();
$table->date('approval_date')->nullable();
$table->tinyInteger('receive_status')->default(0)->nullable();
$table->integer('receive_user')->nullable();
$table->date('receive_date')->nullable();
$table->integer('supplier_id')->nullable();
$table->integer('quotation_number')->nullable();
$table->integer('total_price')->nullable();
$table->date('expiry_date')->nullable();
$table->string('batch_number')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('quotations');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateQuotationTypesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('quotation_types', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by');
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('quotation_types');
}
}
@@ -1,43 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTemporaryQuotationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('temporary_quotations', function (Blueprint $table) {
$table->increments('id');
$table->integer('quotation_type_id');
$table->text('drug_id')->nullable();
$table->text('quantity')->nullable();
$table->date('expected_date')->nullable();
$table->integer('supplier_id')->nullable();
$table->tinyInteger('completion_status')->default(0);
$table->integer('actual_quotation_id')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('temporary_quotations');
}
}
@@ -1,41 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTemporaryRequisitionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('temporary_requisitions', function (Blueprint $table) {
$table->increments('id');
$table->integer('quotation_type_id');
$table->string('drug_id');
$table->string('quantity_requested')->nullable();
$table->tinyInteger('completion_status')->default(0);
$table->integer('actual_requisition_id')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('temporary_requisitions');
}
}
@@ -1,45 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateRequisitionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('requisitions', function (Blueprint $table) {
$table->increments('id');
$table->integer('quotation_type_id');
$table->string('drug_id');
$table->string('quantity_requested')->nullable();
$table->string('per_drug')->nullable();
$table->tinyInteger('issue_status')->nullable();
$table->string('quantity_issued')->nullable();
$table->integer('issued_by')->nullable();
$table->string('unit_of_measure')->nullable();
$table->date('issued_on')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('requisitions');
}
}
@@ -1,40 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateInventoryStockDatesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('inventory_stock_dates', function (Blueprint $table) {
$table->increments('id');
$table->string('quotation_type_id');
$table->integer('item_id');
$table->date('out_of_stock_date')->nullable();
$table->date('restock_date')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('inventory_stock_dates');
}
}
@@ -1,44 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateWardDispensingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ward_dispensings', function (Blueprint $table) {
$table->increments('id');
$table->string('drug_id');
$table->integer('ward_id');
$table->string('quantity_returned')->nullable();
$table->string('quantity_dispensed')->nullable();
$table->string('stock')->nullable();
$table->string('total')->nullable();
$table->string('dispensation_date')->nullable();
$table->string('comment')->nullable();
$table->integer('created_by');
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ward_dispensings');
}
}
@@ -1,50 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePatientDispensingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('patient_dispensings', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('treatment_id');
$table->text('drugs');
$table->text('dose');
$table->text('dose2')->nullable();
$table->text('drug_frequency')->nullable();
$table->text('instructions')->nullable();
$table->text('duration')->nullable();
$table->text('quantity_dispensed')->nullable();
$table->text('long_term')->nullable();
$table->tinyInteger('dispensed')->comment('0 - no, 1 - yes')->default('0');
$table->date('prescription_date')->nullable();
$table->string('pharmacy_comment')->nullable();
$table->tinyInteger('tta')->comment('0 - no, 1 - yes')->default('0');
$table->integer('created_by');
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('patient_dispensings');
}
}
@@ -1,42 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePrescriptionErrorsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('prescription_errors', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('patient_dispensings_id');
$table->string('type_of_error')->nullable();
$table->string('severity_of_error')->nullable();
$table->integer('prescriber')->nullable();
$table->integer('pharmacist')->nullable();
$table->string('comment')->nullable();
$table->integer('created_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('prescription_errors');
}
}
@@ -1,45 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateObservationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('observations', function (Blueprint $table) {
$table->increments('id');
$table->string('system_name')->nullable();
$table->string('name');
$table->string('measurement')->nullable();
$table->decimal('lower_limit',4,1)->nullable();
$table->decimal('upper_limit',5,1)->nullable();
$table->string('options')->nullable();
$table->string('option_for_normal')->nullable();
$table->boolean("compulsory")->comment("1 = yes, 0 = no")->default(0);
$table->string('age_group');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('observations');
}
}
@@ -1,49 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTreatmentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('treatments', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id');
$table->string('drugs')->nullable();
$table->string('doses')->nullable();
$table->string('dose2')->nullable();
$table->string('frequencies')->nullable();
$table->string('durations')->nullable();
$table->string('quantities_dispensed')->nullable();
$table->string('instruction')->nullable();
$table->boolean('dispense_status')->default(0);
$table->boolean('payment_status')->default(0);
$table->integer('altered')->default(0);
$table->boolean('tta')->default(0);
$table->integer('created_by');
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('treatments');
}
}
@@ -1,56 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnteNatalClinicRegistrationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ante_natal_clinic_registrations', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id');
$table->tinyInteger('gravida')->nullable();
$table->tinyInteger('para')->nullable();
$table->tinyInteger('abortion')->nullable();
$table->tinyInteger('previous_pph')->nullable();
$table->string('previous_pph_details')->nullable();
$table->tinyInteger('previous_scar')->nullable();
$table->tinyInteger('previous_scar_number')->nullable();
$table->string('previous_scar_indication')->nullable();
$table->string('other_comments')->nullable();
$table->double('height')->nullable();
$table->double('weight')->nullable();
$table->double('bmi')->nullable();
$table->double('muac')->nullable();
$table->date('lmp')->nullable();
$table->tinyInteger('accuracy')->nullable();
$table->date('edd')->nullable();
$table->integer('referral_from')->nullable();
$table->string('general_comments')->nullable();
$table->integer('created_by');
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ante_natal_clinic_registrations');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnteNatalClinicOutcomesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ante_natal_clinic_outcomes', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ante_natal_clinic_outcomes');
}
}
@@ -1,45 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateObstetricHistoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('obstetric_histories', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id')->nullable();
$table->integer('clinic_id')->nullable();
$table->date('obstetric_date')->nullable();
$table->tinyInteger('gestation')->nullable();
$table->tinyInteger('outcome')->nullable();
$table->string('outcome_name')->nullable();
$table->tinyInteger('outcome_id')->nullable();
$table->string('comments')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('obstetric_histories');
}
}
@@ -1,43 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnteNatalClinicBloodTransfusionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ante_natal_clinic_blood_transfusions', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id')->nullable();
$table->integer('registration_id')->nullable();
$table->integer('blood_group_id')->nullable();
$table->date('transfusion_date')->nullable();
$table->integer('number_of_units')->nullable();
$table->string('comments')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ante_natal_clinic_blood_transfusions');
}
}
@@ -1,47 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAncVdrlHivsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('anc_vdrl_hivs', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id')->nullable();
$table->integer('registration_id')->nullable();
$table->string('vdrl_result')->nullable();
$table->date('vdrl_date')->nullable();
$table->string('vdrl_location')->nullable();
$table->string('hiv_result')->nullable();
$table->date('hiv_date')->nullable();
$table->string('hiv_location')->nullable();
$table->string('art_treatment_center')->nullable();
$table->integer('art_treatment_number')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('anc_vdrl_hivs');
}
}
@@ -1,61 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnteNatalClinicFollowupsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ante_natal_clinic_followups', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id')->nullable();
$table->date('ante_natal_clinic_date')->nullable();
$table->string('ante_natal_clinic_visit_number')->nullable();
$table->integer('ante_natal_clinic_registration_id')->nullable();
$table->double('fundal_height')->nullable();
$table->date('scan_edd')->nullable();
$table->string('gestation_from_edd')->nullable();
$table->string('gestation_from_scan')->nullable();
$table->string('gestation_from_fundal')->nullable();
$table->tinyInteger('lie')->nullable();
$table->tinyInteger('presentation')->nullable();
$table->tinyInteger('position')->nullable();
$table->tinyInteger('engagement')->nullable();
$table->string('foetal_heart_rate')->nullable();
$table->integer('foetal_heart_regularity')->nullable();
$table->integer('aph')->nullable();
$table->string('aph_details')->nullable();
$table->tinyInteger('fits')->nullable();
$table->string('fits_details')->nullable();
$table->string('other_comments')->nullable();
$table->string('bp')->nullable();
$table->string('scan')->nullable();
$table->string('checklist')->nullable();
$table->integer('completion_status')->comment('0 - incomplete, 1 - complete')->default(0);
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ante_natal_clinic_followups');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnteNatalClinicAccuraciesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ante_natal_clinic_accuracies', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ante_natal_clinic_accuracies');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnteNatalClinicLiesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ante_natal_clinic_lies', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ante_natal_clinic_lies');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnteNatalClinicPresentationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ante_natal_clinic_presentations', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ante_natal_clinic_presentations');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnteNatalClinicPositionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ante_natal_clinic_positions', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ante_natal_clinic_positions');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnteNatalClinicEngagementsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ante_natal_clinic_engagements', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ante_natal_clinic_engagements');
}
}
@@ -1,38 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAlertsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('alerts', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->string('alerts')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('alerts');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateHeartRegularitiesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('heart_regularities', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('heart_regularities');
}
}
@@ -1,38 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMaternityProgressTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('maternity_progress', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('color');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('maternity_progress');
}
}
@@ -1,70 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMaternityInpatientsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('maternity_inpatients', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id');
$table->integer('gravida')->nullable();
$table->integer('para')->nullable();
$table->integer('abortion')->nullable();
$table->integer('postpartum')->nullable();
$table->integer('previous_pph')->nullable();
$table->string('previous_pph_details')->nullable();
$table->integer('previous_scar')->nullable();
$table->integer('previous_scar_number')->nullable();
$table->string('previous_scar_indication')->nullable();
$table->string('other_comments_pph')->nullable();
$table->date('lmp')->nullable();
$table->integer('accuracy')->nullable();
$table->date('edd')->nullable();
$table->integer('referral_from')->nullable();
$table->string('progress')->nullable();
$table->integer('born_before_arrival')->nullable();
$table->string('vdrl_location')->nullable();
$table->date('vdrl_date')->nullable();
$table->string('vdrl_result')->nullable();
$table->string('hiv_location')->nullable();
$table->date('hiv_date')->nullable();
$table->integer('hiv_result_usaid')->nullable();
$table->date('scan_edd')->nullable();
$table->string('gestation_from_scan')->nullable();
$table->integer('history_of_fits')->nullable();
$table->integer('history_of_aph')->nullable();
$table->string('aph_details')->nullable();
$table->string('fits_details')->nullable();
$table->string('other_comments')->nullable();
$table->integer('iufd')->nullable();
$table->string('current_acute_problems')->nullable();
$table->string('obstetric_risk_factors')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('maternity_inpatients');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateModeOfDeliveryTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('mode_of_delivery', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('mode_of_delivery');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateLocationOfDeliveryTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('location_of_delivery', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('location_of_delivery');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSpontaneousRegularRespirationInMinutesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('spontaneous_regular_respiration_in_minutes', function (Blueprint $table) {
$table->increments('id');
$table->string('minutes');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('spontaneous_regular_respiration_in_minutes');
}
}
@@ -1,72 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMaternityDeliveryRecordsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('maternity_delivery_records', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('episode_id');
$table->integer('foetal_number');
$table->string('date_of_birth')->nullable();
$table->string('delivery_time')->nullable();
$table->string('duration_1')->nullable();
$table->string('duration_2')->nullable();
$table->string('duration_3')->nullable();
$table->string('delivered_by_cadre')->nullable();
$table->string('delivered_by_name')->nullable();
$table->string('supervised_by')->nullable();
$table->string('mode_of_delivery')->nullable();
$table->string('indication_for_cs')->nullable();
$table->string('location_of_delivery')->nullable();
$table->string('delivery_comments')->nullable();
$table->integer('blood_loss');
$table->string('bloodloss_measurement')->nullable();
$table->string('received_by')->nullable();
$table->string('gender')->nullable();
$table->string('baby_condition')->nullable();
$table->string('weight')->nullable();
$table->string('congenital_abnormalities')->nullable();
$table->string('birth_order')->nullable();
$table->string('baby_comments')->nullable();
$table->string('perinatal_death_notification')->nullable();
$table->string('perinatal_audit_form')->nullable();
$table->string('apgar_score_at_minute_1')->nullable();
$table->string('apgar_score_at_minute_5')->nullable();
$table->string('age_established_spontaneous_reg_respiration')->nullable();
$table->string('resuscitation_airway')->nullable();
$table->string('resuscitation_suction')->nullable();
$table->string('advanced_resuscitation_ett')->nullable();
$table->string('advanced_resuscitation_ecm')->nullable();
$table->string('advanced_resuscitation_drugs')->nullable();
$table->string('IM_vitamin_k_given')->nullable();
$table->string('moved_to')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('maternity_delivery_records');
}
}
@@ -1,44 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateInpatientBedCategoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('inpatient_bed_categories', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('cost_type')->nullable();
$table->integer('cost_per_night')->nullable();
$table->integer('cost_first_night')->nullable();
$table->integer('to_night')->nullable();
$table->integer('cost_range')->nullable();
$table->integer('cost_after')->nullable();
$table->integer('staff_in_charge')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('inpatient_bed_categories');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSpecialitiesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('specialities', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('specialities');
}
}
@@ -1,41 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateInternalWardTransfersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('internal_ward_transfers', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id');
$table->integer('from_ward');
$table->integer('to_ward');
$table->date('transfer_date');
$table->string('comments')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('internal_ward_transfers');
}
}
@@ -1,38 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateBloodDonationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('blood_donations', function (Blueprint $table) {
$table->increments('id');
$table->integer('donor_id');
$table->date('last_donation_date')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('blood_donations');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateIvFluidsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('iv_fluids', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('iv_fluids');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnaesthesiaInductionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('anaesthesia_inductions', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('anaesthesia_inductions');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnaesthesiaAirwaysTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('anaesthesia_airways', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('anaesthesia_airways');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnaesthesiaEttsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('anaesthesia_etts', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('anaesthesia_etts');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMuscleRelaxantsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('muscle_relaxants', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('muscle_relaxants');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnalgesicsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('analgesics', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('analgesics');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnaestheticAgentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('anaesthetic_agents', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('anaesthetic_agents');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnaestheticTechniquesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('anaesthetic_techniques', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('anaesthetic_techniques');
}
}
@@ -1,56 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSurgeriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('surgeries', function (Blueprint $table) {
$table->increments('id');
$table->integer('patient_id')->nullable();
$table->integer('episode_id')->nullable();
$table->integer('anaesthesia_id')->nullable();
$table->integer('procedure_id')->nullable();
$table->string('surgery_type')->nullable();
$table->string('surgeon')->comment("if is number then users table else its temporary staff")->nullable();
$table->string('assistant_surgeon')->comment("if is number then users table else its temporary staff")->nullable();
$table->string('scrub_nurse')->comment("if is number then users table else its temporary staff")->nullable();
$table->string('authorised_swab_check')->comment("if is number then users table else its temporary staff")->nullable();
$table->integer('theatre_location')->nullable();
$table->time('time_surgery_completed')->nullable();
$table->date('date_surgery_completed')->nullable();
$table->string('anaesthesia_duration')->nullable();
$table->string('theatre_in_charge')->nullable();
$table->decimal('estimated_blood_loss', 11, 0)->nullable();
$table->integer('vicryl_sutures_used')->nullable();
$table->integer('other_sutures_used')->nullable();
$table->string('outcome')->nullable();
$table->string('other_scrub_staff')->comment("if is number then users table else its temporary staff")->nullable();
$table->string('comments')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('surgeries');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateNeedleTypesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('needle_types', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('needle_types');
}
}
@@ -1,60 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAnaesthesiasTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('anaesthesias', function (Blueprint $table) {
$table->increments('id');
$table->integer('episode_id');
$table->integer('patient_id');
$table->integer('procedure_id');
$table->integer('surgery_id')->nullable();
$table->integer('anaesthetist');
$table->time('time_commenced');
$table->integer('checklist_confirmed_by');
$table->integer('anaesthesia_type');
$table->integer('induction')->nullable();
$table->longText('anaesthesia_checklist')->nullable();
$table->longText('antibiotics')->nullable();
$table->integer('airway')->nullable();
$table->integer('ETT')->nullable();
$table->integer('agent_used')->nullable();
$table->integer('technique')->nullable();
$table->longText('monitoring_signs')->nullable();
$table->integer('needle_type')->nullable();
$table->float('volume_administered')->nullable();
$table->integer('muscle_relaxant')->nullable();
$table->integer('analgesic')->nullable();
$table->integer('halothane_used')->nullable();
$table->longText('iv_fluids')->nullable();
$table->float('blood_given')->nullable();
$table->longText('comments')->nullable();
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('anaesthesias');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTheatreLocationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('theatre_locations', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by')->nullable();
$table->integer('updated_by')->nullable();
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('theatre_locations');
}
}
@@ -1,48 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePayrollsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up(){
Schema::create('payrolls', function (Blueprint $table) {
$table->increments('id');
$table->string("first_name");
$table->string("last_name");
$table->smallInteger("gender")->comment("1 = Male , 2 = Female , 3 = Other")->nullable();
$table->string("national_id")->nullable();
$table->integer("contact")->nullable();
$table->integer("position");
$table->integer("department");
$table->string("nssf_number")->nullable();
$table->string("tin_number")->nullable();
$table->string("salary_scale")->nullable();
$table->string("contract")->nullable();
$table->integer("payroll_bank_id");
$table->string("bank_account_number");
$table->integer("basic_pay");
$table->integer("created_by");
$table->integer("updated_by");
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down(){
Schema::dropIfExists('payrolls');
}
}
@@ -1,54 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePayrollPaymentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('payroll_payments', function (Blueprint $table) {
$table->increments('id');
$table->integer('member_id');
$table->string('year');
$table->string('month');
$table->integer('headship');
$table->integer('calls');
$table->integer('other');
$table->integer('staff_society');
$table->integer('school_fees');
$table->integer('other_debts');
$table->integer('advances');
$table->integer('vehicle_hire');
$table->integer('patient_debts');
$table->integer('paye_payment');
$table->integer('nssf_payment');
$table->integer('basic_pay');
$table->integer('gross_pay');
$table->integer('total_deductions');
$table->integer('net_pay');
$table->integer('created_by');
$table->integer('updated_by');
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('payroll_payments');
}
}
@@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePayrollNssfRateTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('payroll_nssf_rate', function (Blueprint $table) {
$table->increments('id');
$table->float('value', 8, 2);
$table->integer('created_by');
$table->integer('updated_by');
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('payroll_nssf_rate');
}
}
@@ -1,34 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateDonorsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up(){
Schema::create('donors', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('created_by');
$table->integer('updated_by');
$table->timestamps();
// for soft deletes to create deleted_at column
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down(){
Schema::dropIfExists('donors');
}
}

Some files were not shown because too many files have changed in this diff Show More