Initial import of animal_management module
This commit is contained in:
160
migrations/m260401_210000_initial.php
Normal file
160
migrations/m260401_210000_initial.php
Normal file
@@ -0,0 +1,160 @@
|
||||
<?php
|
||||
|
||||
use humhub\components\Migration;
|
||||
|
||||
class m260401_210000_initial extends Migration
|
||||
{
|
||||
public function safeUp()
|
||||
{
|
||||
$this->safeCreateTable('rescue_animal', [
|
||||
'id' => $this->primaryKey(),
|
||||
'contentcontainer_id' => $this->integer()->notNull(),
|
||||
'animal_uid' => $this->string(190)->notNull(),
|
||||
'name' => $this->string(190)->null(),
|
||||
'species' => $this->string(120)->null(),
|
||||
'breed' => $this->string(120)->null(),
|
||||
'sex' => $this->string(32)->null(),
|
||||
'status' => $this->string(32)->notNull()->defaultValue('intake'),
|
||||
'in_possession' => $this->boolean()->notNull()->defaultValue(1),
|
||||
'location_name' => $this->string(120)->null(),
|
||||
'city' => $this->string(120)->null(),
|
||||
'state' => $this->string(2)->null(),
|
||||
'zip' => $this->string(10)->null(),
|
||||
'previous_owner_user_id' => $this->integer()->null(),
|
||||
'public_summary' => $this->text()->null(),
|
||||
'medical_notes' => $this->text()->null(),
|
||||
'created_at' => $this->dateTime()->null(),
|
||||
'updated_at' => $this->dateTime()->null(),
|
||||
]);
|
||||
|
||||
$this->safeCreateIndex('ux_rescue_animal_uid', 'rescue_animal', 'animal_uid', true);
|
||||
$this->safeCreateIndex('idx_rescue_animal_container', 'rescue_animal', 'contentcontainer_id', false);
|
||||
$this->safeCreateIndex('idx_rescue_animal_status', 'rescue_animal', 'status', false);
|
||||
$this->safeAddForeignKey('fk_rescue_animal_container', 'rescue_animal', 'contentcontainer_id', 'contentcontainer', 'id', 'CASCADE', 'CASCADE');
|
||||
|
||||
if ($this->db->getSchema()->getTableSchema('user', true) !== null) {
|
||||
$this->safeAddForeignKey('fk_rescue_animal_prev_owner', 'rescue_animal', 'previous_owner_user_id', 'user', 'id', 'SET NULL', 'CASCADE');
|
||||
}
|
||||
|
||||
$this->safeCreateTable('rescue_animal_transfer', [
|
||||
'id' => $this->primaryKey(),
|
||||
'animal_id' => $this->integer()->notNull(),
|
||||
'from_contentcontainer_id' => $this->integer()->notNull(),
|
||||
'to_contentcontainer_id' => $this->integer()->notNull(),
|
||||
'requested_by' => $this->integer()->null(),
|
||||
'status' => $this->string(32)->notNull()->defaultValue('requested'),
|
||||
'request_message' => $this->text()->null(),
|
||||
'conditions_text' => $this->text()->null(),
|
||||
'responded_at' => $this->dateTime()->null(),
|
||||
'completed_at' => $this->dateTime()->null(),
|
||||
'created_at' => $this->dateTime()->null(),
|
||||
'updated_at' => $this->dateTime()->null(),
|
||||
]);
|
||||
|
||||
$this->safeCreateIndex('idx_rescue_animal_transfer_animal', 'rescue_animal_transfer', 'animal_id', false);
|
||||
$this->safeCreateIndex('idx_rescue_animal_transfer_status', 'rescue_animal_transfer', 'status', false);
|
||||
$this->safeAddForeignKey('fk_rescue_animal_transfer_animal', 'rescue_animal_transfer', 'animal_id', 'rescue_animal', 'id', 'CASCADE', 'CASCADE');
|
||||
$this->safeAddForeignKey('fk_rescue_animal_transfer_from_container', 'rescue_animal_transfer', 'from_contentcontainer_id', 'contentcontainer', 'id', 'CASCADE', 'CASCADE');
|
||||
$this->safeAddForeignKey('fk_rescue_animal_transfer_to_container', 'rescue_animal_transfer', 'to_contentcontainer_id', 'contentcontainer', 'id', 'CASCADE', 'CASCADE');
|
||||
|
||||
if ($this->db->getSchema()->getTableSchema('user', true) !== null) {
|
||||
$this->safeAddForeignKey('fk_rescue_animal_transfer_requested_by', 'rescue_animal_transfer', 'requested_by', 'user', 'id', 'SET NULL', 'CASCADE');
|
||||
}
|
||||
|
||||
$this->safeCreateTable('rescue_animal_medical_visit', [
|
||||
'id' => $this->primaryKey(),
|
||||
'animal_id' => $this->integer()->notNull(),
|
||||
'visit_at' => $this->dateTime()->null(),
|
||||
'provider_name' => $this->string(190)->null(),
|
||||
'notes' => $this->text()->null(),
|
||||
'recommendations' => $this->text()->null(),
|
||||
'created_by' => $this->integer()->null(),
|
||||
'created_at' => $this->dateTime()->null(),
|
||||
'updated_at' => $this->dateTime()->null(),
|
||||
]);
|
||||
|
||||
$this->safeCreateIndex('idx_rescue_medical_visit_animal', 'rescue_animal_medical_visit', 'animal_id', false);
|
||||
$this->safeAddForeignKey('fk_rescue_medical_visit_animal', 'rescue_animal_medical_visit', 'animal_id', 'rescue_animal', 'id', 'CASCADE', 'CASCADE');
|
||||
|
||||
$this->safeCreateTable('rescue_animal_progress_update', [
|
||||
'id' => $this->primaryKey(),
|
||||
'animal_id' => $this->integer()->notNull(),
|
||||
'update_at' => $this->dateTime()->null(),
|
||||
'weight' => $this->string(32)->null(),
|
||||
'vitals' => $this->text()->null(),
|
||||
'behavior_notes' => $this->text()->null(),
|
||||
'meal_plan_changes' => $this->text()->null(),
|
||||
'housing_changes' => $this->text()->null(),
|
||||
'medical_concerns' => $this->text()->null(),
|
||||
'post_to_space_feed' => $this->boolean()->notNull()->defaultValue(0),
|
||||
'post_to_animal_feed' => $this->boolean()->notNull()->defaultValue(1),
|
||||
'created_by' => $this->integer()->null(),
|
||||
'created_at' => $this->dateTime()->null(),
|
||||
'updated_at' => $this->dateTime()->null(),
|
||||
]);
|
||||
|
||||
$this->safeCreateIndex('idx_rescue_progress_animal', 'rescue_animal_progress_update', 'animal_id', false);
|
||||
$this->safeAddForeignKey('fk_rescue_progress_animal', 'rescue_animal_progress_update', 'animal_id', 'rescue_animal', 'id', 'CASCADE', 'CASCADE');
|
||||
|
||||
$this->seedFieldMetadata();
|
||||
}
|
||||
|
||||
public function safeDown()
|
||||
{
|
||||
$this->safeDropTable('rescue_animal_progress_update');
|
||||
$this->safeDropTable('rescue_animal_medical_visit');
|
||||
$this->safeDropTable('rescue_animal_transfer');
|
||||
$this->safeDropTable('rescue_animal');
|
||||
}
|
||||
|
||||
private function seedFieldMetadata(): void
|
||||
{
|
||||
if ($this->db->getSchema()->getTableSchema('rescue_field_definition', true) === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$createdAt = date('Y-m-d H:i:s');
|
||||
$rows = [
|
||||
['name', 'Animal name', 'text', 0, 1, 100],
|
||||
['species', 'Species', 'text', 0, 1, 110],
|
||||
['breed', 'Breed', 'text', 0, 1, 120],
|
||||
['sex', 'Sex', 'text', 0, 1, 130],
|
||||
['status', 'Status', 'select', 1, 1, 140],
|
||||
['in_possession', 'In possession', 'boolean', 1, 1, 150],
|
||||
['location_name', 'Location name', 'text', 0, 1, 160],
|
||||
['city', 'City', 'text', 0, 1, 170],
|
||||
['state', 'State', 'text', 0, 1, 180],
|
||||
['zip', 'ZIP', 'text', 0, 1, 190],
|
||||
['public_summary', 'Public summary', 'textarea', 0, 1, 200],
|
||||
['medical_notes', 'Medical notes', 'textarea', 0, 1, 210],
|
||||
];
|
||||
|
||||
foreach ($rows as $row) {
|
||||
[$fieldKey, $label, $inputType, $required, $isCore, $sortOrder] = $row;
|
||||
$exists = (new \yii\db\Query())
|
||||
->from('rescue_field_definition')
|
||||
->where(['module_id' => 'animal_management', 'field_key' => $fieldKey])
|
||||
->exists($this->db);
|
||||
|
||||
if ($exists) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->insert('rescue_field_definition', [
|
||||
'module_id' => 'animal_management',
|
||||
'group_key' => 'animal_profile',
|
||||
'field_key' => $fieldKey,
|
||||
'label' => $label,
|
||||
'input_type' => $inputType,
|
||||
'required' => $required,
|
||||
'is_core' => $isCore,
|
||||
'is_active' => 1,
|
||||
'visibility' => 'public',
|
||||
'options' => '{}',
|
||||
'sort_order' => $sortOrder,
|
||||
'created_at' => $createdAt,
|
||||
'updated_at' => $createdAt,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
63
migrations/m260402_010000_transfer_event_audit.php
Normal file
63
migrations/m260402_010000_transfer_event_audit.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
use humhub\components\Migration;
|
||||
|
||||
class m260402_010000_transfer_event_audit extends Migration
|
||||
{
|
||||
public function safeUp()
|
||||
{
|
||||
$this->safeCreateTable('rescue_animal_transfer_event', [
|
||||
'id' => $this->primaryKey(),
|
||||
'transfer_id' => $this->integer()->notNull(),
|
||||
'animal_id' => $this->integer()->notNull(),
|
||||
'event_type' => $this->string(32)->notNull(),
|
||||
'from_status' => $this->string(32)->null(),
|
||||
'to_status' => $this->string(32)->null(),
|
||||
'message' => $this->text()->null(),
|
||||
'metadata_json' => $this->text()->null(),
|
||||
'created_by' => $this->integer()->null(),
|
||||
'created_at' => $this->dateTime()->null(),
|
||||
]);
|
||||
|
||||
$this->safeCreateIndex('idx_rescue_transfer_event_transfer', 'rescue_animal_transfer_event', 'transfer_id', false);
|
||||
$this->safeCreateIndex('idx_rescue_transfer_event_animal', 'rescue_animal_transfer_event', 'animal_id', false);
|
||||
$this->safeCreateIndex('idx_rescue_transfer_event_type', 'rescue_animal_transfer_event', 'event_type', false);
|
||||
$this->safeCreateIndex('idx_rescue_transfer_event_created_at', 'rescue_animal_transfer_event', 'created_at', false);
|
||||
|
||||
$this->safeAddForeignKey(
|
||||
'fk_rescue_transfer_event_transfer',
|
||||
'rescue_animal_transfer_event',
|
||||
'transfer_id',
|
||||
'rescue_animal_transfer',
|
||||
'id',
|
||||
'CASCADE',
|
||||
'CASCADE'
|
||||
);
|
||||
$this->safeAddForeignKey(
|
||||
'fk_rescue_transfer_event_animal',
|
||||
'rescue_animal_transfer_event',
|
||||
'animal_id',
|
||||
'rescue_animal',
|
||||
'id',
|
||||
'CASCADE',
|
||||
'CASCADE'
|
||||
);
|
||||
|
||||
if ($this->db->getSchema()->getTableSchema('user', true) !== null) {
|
||||
$this->safeAddForeignKey(
|
||||
'fk_rescue_transfer_event_created_by',
|
||||
'rescue_animal_transfer_event',
|
||||
'created_by',
|
||||
'user',
|
||||
'id',
|
||||
'SET NULL',
|
||||
'CASCADE'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function safeDown()
|
||||
{
|
||||
$this->safeDropTable('rescue_animal_transfer_event');
|
||||
}
|
||||
}
|
||||
50
migrations/m260402_020000_animal_field_values.php
Normal file
50
migrations/m260402_020000_animal_field_values.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
use humhub\components\Migration;
|
||||
|
||||
class m260402_020000_animal_field_values extends Migration
|
||||
{
|
||||
public function safeUp()
|
||||
{
|
||||
$this->safeCreateTable('rescue_animal_field_value', [
|
||||
'id' => $this->primaryKey(),
|
||||
'animal_id' => $this->integer()->notNull(),
|
||||
'field_definition_id' => $this->integer()->notNull(),
|
||||
'value_text' => $this->text()->null(),
|
||||
'value_json' => $this->text()->null(),
|
||||
'created_at' => $this->dateTime()->null(),
|
||||
'updated_at' => $this->dateTime()->null(),
|
||||
]);
|
||||
|
||||
$this->safeCreateIndex('ux_rescue_animal_field_value_unique', 'rescue_animal_field_value', ['animal_id', 'field_definition_id'], true);
|
||||
$this->safeCreateIndex('idx_rescue_animal_field_value_animal', 'rescue_animal_field_value', 'animal_id', false);
|
||||
$this->safeCreateIndex('idx_rescue_animal_field_value_definition', 'rescue_animal_field_value', 'field_definition_id', false);
|
||||
|
||||
$this->safeAddForeignKey(
|
||||
'fk_rescue_animal_field_value_animal',
|
||||
'rescue_animal_field_value',
|
||||
'animal_id',
|
||||
'rescue_animal',
|
||||
'id',
|
||||
'CASCADE',
|
||||
'CASCADE'
|
||||
);
|
||||
|
||||
if ($this->db->getSchema()->getTableSchema('rescue_field_definition', true) !== null) {
|
||||
$this->safeAddForeignKey(
|
||||
'fk_rescue_animal_field_value_definition',
|
||||
'rescue_animal_field_value',
|
||||
'field_definition_id',
|
||||
'rescue_field_definition',
|
||||
'id',
|
||||
'CASCADE',
|
||||
'CASCADE'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function safeDown()
|
||||
{
|
||||
$this->safeDropTable('rescue_animal_field_value');
|
||||
}
|
||||
}
|
||||
117
migrations/m260402_030000_medical_progress_field_values.php
Normal file
117
migrations/m260402_030000_medical_progress_field_values.php
Normal file
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
use humhub\components\Migration;
|
||||
|
||||
class m260402_030000_medical_progress_field_values extends Migration
|
||||
{
|
||||
public function safeUp()
|
||||
{
|
||||
$this->safeCreateTable('rescue_animal_medical_visit_field_value', [
|
||||
'id' => $this->primaryKey(),
|
||||
'medical_visit_id' => $this->integer()->notNull(),
|
||||
'field_definition_id' => $this->integer()->notNull(),
|
||||
'value_text' => $this->text()->null(),
|
||||
'value_json' => $this->text()->null(),
|
||||
'created_at' => $this->dateTime()->null(),
|
||||
'updated_at' => $this->dateTime()->null(),
|
||||
]);
|
||||
|
||||
$this->safeCreateIndex(
|
||||
'ux_rescue_medical_visit_field_value_unique',
|
||||
'rescue_animal_medical_visit_field_value',
|
||||
['medical_visit_id', 'field_definition_id'],
|
||||
true
|
||||
);
|
||||
$this->safeCreateIndex(
|
||||
'idx_rescue_medical_visit_field_value_visit',
|
||||
'rescue_animal_medical_visit_field_value',
|
||||
'medical_visit_id',
|
||||
false
|
||||
);
|
||||
$this->safeCreateIndex(
|
||||
'idx_rescue_medical_visit_field_value_definition',
|
||||
'rescue_animal_medical_visit_field_value',
|
||||
'field_definition_id',
|
||||
false
|
||||
);
|
||||
|
||||
$this->safeAddForeignKey(
|
||||
'fk_rescue_medical_visit_field_value_visit',
|
||||
'rescue_animal_medical_visit_field_value',
|
||||
'medical_visit_id',
|
||||
'rescue_animal_medical_visit',
|
||||
'id',
|
||||
'CASCADE',
|
||||
'CASCADE'
|
||||
);
|
||||
|
||||
if ($this->db->getSchema()->getTableSchema('rescue_field_definition', true) !== null) {
|
||||
$this->safeAddForeignKey(
|
||||
'fk_rescue_medical_visit_field_value_definition',
|
||||
'rescue_animal_medical_visit_field_value',
|
||||
'field_definition_id',
|
||||
'rescue_field_definition',
|
||||
'id',
|
||||
'CASCADE',
|
||||
'CASCADE'
|
||||
);
|
||||
}
|
||||
|
||||
$this->safeCreateTable('rescue_animal_progress_update_field_value', [
|
||||
'id' => $this->primaryKey(),
|
||||
'progress_update_id' => $this->integer()->notNull(),
|
||||
'field_definition_id' => $this->integer()->notNull(),
|
||||
'value_text' => $this->text()->null(),
|
||||
'value_json' => $this->text()->null(),
|
||||
'created_at' => $this->dateTime()->null(),
|
||||
'updated_at' => $this->dateTime()->null(),
|
||||
]);
|
||||
|
||||
$this->safeCreateIndex(
|
||||
'ux_rescue_progress_update_field_value_unique',
|
||||
'rescue_animal_progress_update_field_value',
|
||||
['progress_update_id', 'field_definition_id'],
|
||||
true
|
||||
);
|
||||
$this->safeCreateIndex(
|
||||
'idx_rescue_progress_update_field_value_update',
|
||||
'rescue_animal_progress_update_field_value',
|
||||
'progress_update_id',
|
||||
false
|
||||
);
|
||||
$this->safeCreateIndex(
|
||||
'idx_rescue_progress_update_field_value_definition',
|
||||
'rescue_animal_progress_update_field_value',
|
||||
'field_definition_id',
|
||||
false
|
||||
);
|
||||
|
||||
$this->safeAddForeignKey(
|
||||
'fk_rescue_progress_update_field_value_update',
|
||||
'rescue_animal_progress_update_field_value',
|
||||
'progress_update_id',
|
||||
'rescue_animal_progress_update',
|
||||
'id',
|
||||
'CASCADE',
|
||||
'CASCADE'
|
||||
);
|
||||
|
||||
if ($this->db->getSchema()->getTableSchema('rescue_field_definition', true) !== null) {
|
||||
$this->safeAddForeignKey(
|
||||
'fk_rescue_progress_update_field_value_definition',
|
||||
'rescue_animal_progress_update_field_value',
|
||||
'field_definition_id',
|
||||
'rescue_field_definition',
|
||||
'id',
|
||||
'CASCADE',
|
||||
'CASCADE'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function safeDown()
|
||||
{
|
||||
$this->safeDropTable('rescue_animal_progress_update_field_value');
|
||||
$this->safeDropTable('rescue_animal_medical_visit_field_value');
|
||||
}
|
||||
}
|
||||
61
migrations/m260402_040000_add_image_profile_fields.php
Normal file
61
migrations/m260402_040000_add_image_profile_fields.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
use humhub\components\Migration;
|
||||
|
||||
class m260402_040000_add_image_profile_fields extends Migration
|
||||
{
|
||||
public function safeUp()
|
||||
{
|
||||
if ($this->db->getSchema()->getTableSchema('rescue_field_definition', true) === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$createdAt = date('Y-m-d H:i:s');
|
||||
$rows = [
|
||||
['cover_image_url', 'Cover image URL', 230],
|
||||
['profile_image_url', 'Profile image URL', 240],
|
||||
];
|
||||
|
||||
foreach ($rows as $row) {
|
||||
[$fieldKey, $label, $sortOrder] = $row;
|
||||
|
||||
$exists = (new \yii\db\Query())
|
||||
->from('rescue_field_definition')
|
||||
->where(['module_id' => 'animal_management', 'field_key' => $fieldKey])
|
||||
->exists($this->db);
|
||||
|
||||
if ($exists) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->insert('rescue_field_definition', [
|
||||
'module_id' => 'animal_management',
|
||||
'group_key' => 'animal_profile',
|
||||
'field_key' => $fieldKey,
|
||||
'label' => $label,
|
||||
'input_type' => 'text',
|
||||
'required' => 0,
|
||||
'is_core' => 0,
|
||||
'is_active' => 1,
|
||||
'visibility' => 'public',
|
||||
'options' => '{}',
|
||||
'sort_order' => $sortOrder,
|
||||
'created_at' => $createdAt,
|
||||
'updated_at' => $createdAt,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function safeDown()
|
||||
{
|
||||
if ($this->db->getSchema()->getTableSchema('rescue_field_definition', true) === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->delete('rescue_field_definition', [
|
||||
'module_id' => 'animal_management',
|
||||
'field_key' => ['cover_image_url', 'profile_image_url'],
|
||||
'is_core' => 0,
|
||||
]);
|
||||
}
|
||||
}
|
||||
160
migrations/m260402_050000_seed_requirement_default_fields.php
Normal file
160
migrations/m260402_050000_seed_requirement_default_fields.php
Normal file
@@ -0,0 +1,160 @@
|
||||
<?php
|
||||
|
||||
use humhub\components\Migration;
|
||||
|
||||
class m260402_050000_seed_requirement_default_fields extends Migration
|
||||
{
|
||||
public function safeUp()
|
||||
{
|
||||
if ($this->db->getSchema()->getTableSchema('rescue_field_definition', true) === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$createdAt = date('Y-m-d H:i:s');
|
||||
|
||||
$rows = [
|
||||
// Animal profile defaults from requirements
|
||||
['animal_profile', 'dob', 'DOB', 'date', 0, 1, 'public', 112],
|
||||
['animal_profile', 'age', 'Age', 'text', 0, 1, 'public', 113],
|
||||
['animal_profile', 'previous_owner_user_id', 'Previous Owner User ID', 'number', 0, 1, 'internal', 114],
|
||||
['animal_profile', 'previous_owner_name', 'Previous Owner Name', 'text', 0, 1, 'internal', 115],
|
||||
['animal_profile', 'previous_owner_business_name', 'Previous Owner Business Name', 'text', 0, 1, 'internal', 116],
|
||||
['animal_profile', 'previous_owner_street_address', 'Previous Owner Street Address', 'text', 0, 1, 'internal', 117],
|
||||
['animal_profile', 'previous_owner_city', 'Previous Owner City', 'text', 0, 1, 'internal', 118],
|
||||
['animal_profile', 'previous_owner_state', 'Previous Owner State', 'text', 0, 1, 'internal', 119],
|
||||
['animal_profile', 'previous_owner_zip', 'Previous Owner Zip', 'text', 0, 1, 'internal', 120],
|
||||
['animal_profile', 'previous_owner_cell_phone', 'Previous Owner Cell Phone', 'text', 0, 1, 'internal', 121],
|
||||
['animal_profile', 'previous_owner_business_phone', 'Previous Owner Business Phone', 'text', 0, 1, 'internal', 122],
|
||||
['animal_profile', 'previous_owner_email', 'Previous Owner Email', 'text', 0, 1, 'internal', 123],
|
||||
['animal_profile', 'lineage', 'Lineage', 'textarea', 0, 1, 'public', 124],
|
||||
['animal_profile', 'backstory', 'Backstory', 'textarea', 0, 1, 'public', 125],
|
||||
['animal_profile', 'rescue', 'Rescue', 'text', 0, 1, 'internal', 126],
|
||||
|
||||
// Medical visit defaults from requirements
|
||||
['animal_medical_visit', 'weight', 'Weight', 'text', 0, 1, 'internal', 210],
|
||||
['animal_medical_visit', 'pulse', 'Pulse', 'text', 0, 1, 'internal', 211],
|
||||
['animal_medical_visit', 'blood_pressure', 'Blood Pressure', 'text', 0, 1, 'internal', 212],
|
||||
['animal_medical_visit', 'oxygen', 'Oxygen', 'text', 0, 1, 'internal', 213],
|
||||
['animal_medical_visit', 'chronic_conditions', 'Chronic Conditions', 'textarea', 0, 1, 'internal', 214],
|
||||
['animal_medical_visit', 'acute_conditions', 'Acute Conditions', 'textarea', 0, 1, 'internal', 215],
|
||||
['animal_medical_visit', 'special_needs', 'Special Needs', 'textarea', 0, 1, 'internal', 216],
|
||||
['animal_medical_visit', 'date_of_most_recent_medical_visit', 'Date of Most Recent Medical Visit', 'date', 0, 1, 'internal', 217],
|
||||
|
||||
['animal_medical_visit', 'physician_name', 'Physician Name', 'text', 0, 1, 'internal', 218],
|
||||
['animal_medical_visit', 'physician_business_name', 'Physician Business Name', 'text', 0, 1, 'internal', 219],
|
||||
['animal_medical_visit', 'physician_street_address', 'Physician Street Address', 'text', 0, 1, 'internal', 220],
|
||||
['animal_medical_visit', 'physician_city', 'Physician City', 'text', 0, 1, 'internal', 221],
|
||||
['animal_medical_visit', 'physician_state', 'Physician State', 'text', 0, 1, 'internal', 222],
|
||||
['animal_medical_visit', 'physician_zip', 'Physician Zip', 'text', 0, 1, 'internal', 223],
|
||||
['animal_medical_visit', 'physician_cell_phone', 'Physician Cell Phone', 'text', 0, 1, 'internal', 224],
|
||||
['animal_medical_visit', 'physician_business_phone', 'Physician Business Phone', 'text', 0, 1, 'internal', 225],
|
||||
['animal_medical_visit', 'physician_license_number', 'Physician License Number', 'text', 0, 1, 'internal', 226],
|
||||
|
||||
['animal_medical_visit', 'second_physician_name', 'Second Physician Name', 'text', 0, 1, 'internal', 227],
|
||||
['animal_medical_visit', 'second_physician_business_name', 'Second Physician Business Name', 'text', 0, 1, 'internal', 228],
|
||||
['animal_medical_visit', 'second_physician_street_address', 'Second Physician Street Address', 'text', 0, 1, 'internal', 229],
|
||||
['animal_medical_visit', 'second_physician_city', 'Second Physician City', 'text', 0, 1, 'internal', 230],
|
||||
['animal_medical_visit', 'second_physician_state', 'Second Physician State', 'text', 0, 1, 'internal', 231],
|
||||
['animal_medical_visit', 'second_physician_zip', 'Second Physician Zip', 'text', 0, 1, 'internal', 232],
|
||||
['animal_medical_visit', 'second_physician_cell_phone', 'Second Physician Cell Phone', 'text', 0, 1, 'internal', 233],
|
||||
['animal_medical_visit', 'second_physician_business_phone', 'Second Physician Business Phone', 'text', 0, 1, 'internal', 234],
|
||||
['animal_medical_visit', 'second_physician_license_number', 'Second Physician License Number', 'text', 0, 1, 'internal', 235],
|
||||
|
||||
['animal_medical_visit', 'previous_physicians', 'Previous Physician(s)', 'textarea', 0, 1, 'internal', 236],
|
||||
|
||||
// Progress defaults from requirements
|
||||
['animal_progress_update', 'progress_notes', 'Notes', 'textarea', 0, 1, 'internal', 310],
|
||||
['animal_progress_update', 'routine_updates', 'Updates', 'textarea', 0, 1, 'internal', 311],
|
||||
['animal_progress_update', 'media_reference', 'Media', 'text', 0, 1, 'internal', 312],
|
||||
];
|
||||
|
||||
foreach ($rows as $row) {
|
||||
[$groupKey, $fieldKey, $label, $inputType, $required, $isActive, $visibility, $sortOrder] = $row;
|
||||
|
||||
$exists = (new \yii\db\Query())
|
||||
->from('rescue_field_definition')
|
||||
->where(['module_id' => 'animal_management', 'field_key' => $fieldKey])
|
||||
->exists($this->db);
|
||||
|
||||
if ($exists) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->insert('rescue_field_definition', [
|
||||
'module_id' => 'animal_management',
|
||||
'group_key' => $groupKey,
|
||||
'field_key' => $fieldKey,
|
||||
'label' => $label,
|
||||
'input_type' => $inputType,
|
||||
'required' => $required,
|
||||
'is_core' => 0,
|
||||
'is_active' => $isActive,
|
||||
'visibility' => $visibility,
|
||||
'options' => '{}',
|
||||
'sort_order' => $sortOrder,
|
||||
'created_at' => $createdAt,
|
||||
'updated_at' => $createdAt,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function safeDown()
|
||||
{
|
||||
if ($this->db->getSchema()->getTableSchema('rescue_field_definition', true) === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$fieldKeys = [
|
||||
'dob',
|
||||
'age',
|
||||
'previous_owner_user_id',
|
||||
'previous_owner_name',
|
||||
'previous_owner_business_name',
|
||||
'previous_owner_street_address',
|
||||
'previous_owner_city',
|
||||
'previous_owner_state',
|
||||
'previous_owner_zip',
|
||||
'previous_owner_cell_phone',
|
||||
'previous_owner_business_phone',
|
||||
'previous_owner_email',
|
||||
'lineage',
|
||||
'backstory',
|
||||
'rescue',
|
||||
'pulse',
|
||||
'blood_pressure',
|
||||
'oxygen',
|
||||
'chronic_conditions',
|
||||
'acute_conditions',
|
||||
'special_needs',
|
||||
'date_of_most_recent_medical_visit',
|
||||
'physician_name',
|
||||
'physician_business_name',
|
||||
'physician_street_address',
|
||||
'physician_city',
|
||||
'physician_state',
|
||||
'physician_zip',
|
||||
'physician_cell_phone',
|
||||
'physician_business_phone',
|
||||
'physician_license_number',
|
||||
'second_physician_name',
|
||||
'second_physician_business_name',
|
||||
'second_physician_street_address',
|
||||
'second_physician_city',
|
||||
'second_physician_state',
|
||||
'second_physician_zip',
|
||||
'second_physician_cell_phone',
|
||||
'second_physician_business_phone',
|
||||
'second_physician_license_number',
|
||||
'previous_physicians',
|
||||
'progress_notes',
|
||||
'routine_updates',
|
||||
'media_reference',
|
||||
];
|
||||
|
||||
$this->delete('rescue_field_definition', [
|
||||
'module_id' => 'animal_management',
|
||||
'field_key' => $fieldKeys,
|
||||
'is_core' => 0,
|
||||
]);
|
||||
}
|
||||
}
|
||||
66
migrations/m260402_060000_create_animal_gallery.php
Normal file
66
migrations/m260402_060000_create_animal_gallery.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
use humhub\components\Migration;
|
||||
|
||||
class m260402_060000_create_animal_gallery extends Migration
|
||||
{
|
||||
public function safeUp()
|
||||
{
|
||||
$this->safeCreateTable('rescue_animal_gallery_item', [
|
||||
'id' => $this->primaryKey(),
|
||||
'animal_id' => $this->integer()->notNull(),
|
||||
'file_path' => $this->string(500)->null(),
|
||||
'file_id' => $this->integer()->null(),
|
||||
'source_post_id' => $this->integer()->null(),
|
||||
'source_type' => $this->string(32)->notNull()->defaultValue('upload'),
|
||||
'caption' => $this->text()->null(),
|
||||
'created_by' => $this->integer()->null(),
|
||||
'created_at' => $this->dateTime()->null(),
|
||||
'updated_at' => $this->dateTime()->null(),
|
||||
]);
|
||||
|
||||
$this->safeCreateIndex('idx_rescue_animal_gallery_animal', 'rescue_animal_gallery_item', 'animal_id', false);
|
||||
$this->safeCreateIndex('idx_rescue_animal_gallery_file', 'rescue_animal_gallery_item', 'file_id', false);
|
||||
$this->safeCreateIndex('idx_rescue_animal_gallery_post', 'rescue_animal_gallery_item', 'source_post_id', false);
|
||||
$this->safeCreateIndex('idx_rescue_animal_gallery_created', 'rescue_animal_gallery_item', ['animal_id', 'id'], false);
|
||||
|
||||
$this->safeAddForeignKey(
|
||||
'fk_rescue_animal_gallery_animal',
|
||||
'rescue_animal_gallery_item',
|
||||
'animal_id',
|
||||
'rescue_animal',
|
||||
'id',
|
||||
'CASCADE',
|
||||
'CASCADE'
|
||||
);
|
||||
|
||||
if ($this->db->getSchema()->getTableSchema('file', true) !== null) {
|
||||
$this->safeAddForeignKey(
|
||||
'fk_rescue_animal_gallery_file',
|
||||
'rescue_animal_gallery_item',
|
||||
'file_id',
|
||||
'file',
|
||||
'id',
|
||||
'SET NULL',
|
||||
'CASCADE'
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->db->getSchema()->getTableSchema('post', true) !== null) {
|
||||
$this->safeAddForeignKey(
|
||||
'fk_rescue_animal_gallery_post',
|
||||
'rescue_animal_gallery_item',
|
||||
'source_post_id',
|
||||
'post',
|
||||
'id',
|
||||
'SET NULL',
|
||||
'CASCADE'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function safeDown()
|
||||
{
|
||||
$this->safeDropTable('rescue_animal_gallery_item');
|
||||
}
|
||||
}
|
||||
133
migrations/m260402_070000_lock_requirement_default_fields.php
Normal file
133
migrations/m260402_070000_lock_requirement_default_fields.php
Normal file
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
|
||||
use humhub\components\Migration;
|
||||
|
||||
class m260402_070000_lock_requirement_default_fields extends Migration
|
||||
{
|
||||
public function safeUp()
|
||||
{
|
||||
if ($this->db->getSchema()->getTableSchema('rescue_field_definition', true) === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$fieldKeys = [
|
||||
'dob',
|
||||
'age',
|
||||
'previous_owner_user_id',
|
||||
'previous_owner_name',
|
||||
'previous_owner_business_name',
|
||||
'previous_owner_street_address',
|
||||
'previous_owner_city',
|
||||
'previous_owner_state',
|
||||
'previous_owner_zip',
|
||||
'previous_owner_cell_phone',
|
||||
'previous_owner_business_phone',
|
||||
'previous_owner_email',
|
||||
'lineage',
|
||||
'backstory',
|
||||
'rescue',
|
||||
'weight',
|
||||
'pulse',
|
||||
'blood_pressure',
|
||||
'oxygen',
|
||||
'chronic_conditions',
|
||||
'acute_conditions',
|
||||
'special_needs',
|
||||
'date_of_most_recent_medical_visit',
|
||||
'physician_name',
|
||||
'physician_business_name',
|
||||
'physician_street_address',
|
||||
'physician_city',
|
||||
'physician_state',
|
||||
'physician_zip',
|
||||
'physician_cell_phone',
|
||||
'physician_business_phone',
|
||||
'physician_license_number',
|
||||
'second_physician_name',
|
||||
'second_physician_business_name',
|
||||
'second_physician_street_address',
|
||||
'second_physician_city',
|
||||
'second_physician_state',
|
||||
'second_physician_zip',
|
||||
'second_physician_cell_phone',
|
||||
'second_physician_business_phone',
|
||||
'second_physician_license_number',
|
||||
'previous_physicians',
|
||||
'progress_notes',
|
||||
'routine_updates',
|
||||
'media_reference',
|
||||
];
|
||||
|
||||
$this->update('rescue_field_definition', [
|
||||
'is_core' => 1,
|
||||
'is_active' => 1,
|
||||
'updated_at' => date('Y-m-d H:i:s'),
|
||||
], [
|
||||
'module_id' => 'animal_management',
|
||||
'field_key' => $fieldKeys,
|
||||
]);
|
||||
}
|
||||
|
||||
public function safeDown()
|
||||
{
|
||||
if ($this->db->getSchema()->getTableSchema('rescue_field_definition', true) === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$fieldKeys = [
|
||||
'dob',
|
||||
'age',
|
||||
'previous_owner_user_id',
|
||||
'previous_owner_name',
|
||||
'previous_owner_business_name',
|
||||
'previous_owner_street_address',
|
||||
'previous_owner_city',
|
||||
'previous_owner_state',
|
||||
'previous_owner_zip',
|
||||
'previous_owner_cell_phone',
|
||||
'previous_owner_business_phone',
|
||||
'previous_owner_email',
|
||||
'lineage',
|
||||
'backstory',
|
||||
'rescue',
|
||||
'weight',
|
||||
'pulse',
|
||||
'blood_pressure',
|
||||
'oxygen',
|
||||
'chronic_conditions',
|
||||
'acute_conditions',
|
||||
'special_needs',
|
||||
'date_of_most_recent_medical_visit',
|
||||
'physician_name',
|
||||
'physician_business_name',
|
||||
'physician_street_address',
|
||||
'physician_city',
|
||||
'physician_state',
|
||||
'physician_zip',
|
||||
'physician_cell_phone',
|
||||
'physician_business_phone',
|
||||
'physician_license_number',
|
||||
'second_physician_name',
|
||||
'second_physician_business_name',
|
||||
'second_physician_street_address',
|
||||
'second_physician_city',
|
||||
'second_physician_state',
|
||||
'second_physician_zip',
|
||||
'second_physician_cell_phone',
|
||||
'second_physician_business_phone',
|
||||
'second_physician_license_number',
|
||||
'previous_physicians',
|
||||
'progress_notes',
|
||||
'routine_updates',
|
||||
'media_reference',
|
||||
];
|
||||
|
||||
$this->update('rescue_field_definition', [
|
||||
'is_core' => 0,
|
||||
'updated_at' => date('Y-m-d H:i:s'),
|
||||
], [
|
||||
'module_id' => 'animal_management',
|
||||
'field_key' => $fieldKeys,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
use humhub\components\Migration;
|
||||
|
||||
class m260402_080000_add_display_override_profile_fields extends Migration
|
||||
{
|
||||
public function safeUp()
|
||||
{
|
||||
if ($this->db->getSchema()->getTableSchema('rescue_field_definition', true) === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$createdAt = date('Y-m-d H:i:s');
|
||||
$rows = [
|
||||
['tile_display_fields', 'Tile Display Fields', 250],
|
||||
['hero_display_fields', 'Hero Display Fields', 251],
|
||||
];
|
||||
|
||||
foreach ($rows as $row) {
|
||||
[$fieldKey, $label, $sortOrder] = $row;
|
||||
|
||||
$existingId = (new \yii\db\Query())
|
||||
->select('id')
|
||||
->from('rescue_field_definition')
|
||||
->where([
|
||||
'module_id' => 'animal_management',
|
||||
'group_key' => 'animal_profile',
|
||||
'field_key' => $fieldKey,
|
||||
])
|
||||
->scalar($this->db);
|
||||
|
||||
if ($existingId) {
|
||||
$this->update('rescue_field_definition', [
|
||||
'label' => $label,
|
||||
'input_type' => 'text',
|
||||
'required' => 0,
|
||||
'is_core' => 1,
|
||||
'is_active' => 1,
|
||||
'visibility' => 'internal',
|
||||
'sort_order' => $sortOrder,
|
||||
'updated_at' => $createdAt,
|
||||
], ['id' => (int)$existingId]);
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->insert('rescue_field_definition', [
|
||||
'module_id' => 'animal_management',
|
||||
'group_key' => 'animal_profile',
|
||||
'field_key' => $fieldKey,
|
||||
'label' => $label,
|
||||
'input_type' => 'text',
|
||||
'required' => 0,
|
||||
'is_core' => 1,
|
||||
'is_active' => 1,
|
||||
'visibility' => 'internal',
|
||||
'options' => '{}',
|
||||
'sort_order' => $sortOrder,
|
||||
'created_at' => $createdAt,
|
||||
'updated_at' => $createdAt,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function safeDown()
|
||||
{
|
||||
if ($this->db->getSchema()->getTableSchema('rescue_field_definition', true) === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->update('rescue_field_definition', [
|
||||
'is_core' => 0,
|
||||
'updated_at' => date('Y-m-d H:i:s'),
|
||||
], [
|
||||
'module_id' => 'animal_management',
|
||||
'group_key' => 'animal_profile',
|
||||
'field_key' => ['tile_display_fields', 'hero_display_fields'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
55
migrations/m260403_120000_create_animal_gallery_link.php
Normal file
55
migrations/m260403_120000_create_animal_gallery_link.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
use humhub\components\Migration;
|
||||
|
||||
class m260403_120000_create_animal_gallery_link extends Migration
|
||||
{
|
||||
public function safeUp()
|
||||
{
|
||||
if ($this->db->getSchema()->getTableSchema('rescue_animal_gallery_link', true) !== null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->safeCreateTable('rescue_animal_gallery_link', [
|
||||
'id' => $this->primaryKey(),
|
||||
'animal_id' => $this->integer()->notNull(),
|
||||
'gallery_id' => $this->integer()->notNull(),
|
||||
'contentcontainer_id' => $this->integer()->notNull(),
|
||||
'created_at' => $this->dateTime()->null(),
|
||||
'updated_at' => $this->dateTime()->null(),
|
||||
]);
|
||||
|
||||
$this->safeCreateIndex('idx_rescue_animal_gallery_link_animal', 'rescue_animal_gallery_link', 'animal_id', true);
|
||||
$this->safeCreateIndex('idx_rescue_animal_gallery_link_gallery', 'rescue_animal_gallery_link', 'gallery_id', true);
|
||||
$this->safeCreateIndex('idx_rescue_animal_gallery_link_container', 'rescue_animal_gallery_link', 'contentcontainer_id', false);
|
||||
|
||||
if ($this->db->getSchema()->getTableSchema('rescue_animal', true) !== null) {
|
||||
$this->safeAddForeignKey(
|
||||
'fk_rescue_animal_gallery_link_animal',
|
||||
'rescue_animal_gallery_link',
|
||||
'animal_id',
|
||||
'rescue_animal',
|
||||
'id',
|
||||
'CASCADE',
|
||||
'CASCADE'
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->db->getSchema()->getTableSchema('gallery_gallery', true) !== null) {
|
||||
$this->safeAddForeignKey(
|
||||
'fk_rescue_animal_gallery_link_gallery',
|
||||
'rescue_animal_gallery_link',
|
||||
'gallery_id',
|
||||
'gallery_gallery',
|
||||
'id',
|
||||
'CASCADE',
|
||||
'CASCADE'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function safeDown()
|
||||
{
|
||||
$this->safeDropTable('rescue_animal_gallery_link');
|
||||
}
|
||||
}
|
||||
94
migrations/m260403_130000_add_medical_stream_and_flags.php
Normal file
94
migrations/m260403_130000_add_medical_stream_and_flags.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
use humhub\components\Migration;
|
||||
|
||||
class m260403_130000_add_medical_stream_and_flags extends Migration
|
||||
{
|
||||
public function safeUp()
|
||||
{
|
||||
$medicalTable = $this->db->getSchema()->getTableSchema('rescue_animal_medical_visit', true);
|
||||
if ($medicalTable !== null) {
|
||||
if (!isset($medicalTable->columns['post_to_space_feed'])) {
|
||||
$this->addColumn('rescue_animal_medical_visit', 'post_to_space_feed', $this->boolean()->notNull()->defaultValue(0));
|
||||
}
|
||||
|
||||
if (!isset($medicalTable->columns['post_to_animal_feed'])) {
|
||||
$this->addColumn('rescue_animal_medical_visit', 'post_to_animal_feed', $this->boolean()->notNull()->defaultValue(1));
|
||||
}
|
||||
|
||||
$this->update('rescue_animal_medical_visit', ['post_to_space_feed' => 0], ['post_to_space_feed' => null]);
|
||||
$this->update('rescue_animal_medical_visit', ['post_to_animal_feed' => 1], ['post_to_animal_feed' => null]);
|
||||
}
|
||||
|
||||
if ($this->db->getSchema()->getTableSchema('rescue_animal_stream_entry', true) === null) {
|
||||
$this->safeCreateTable('rescue_animal_stream_entry', [
|
||||
'id' => $this->primaryKey(),
|
||||
'animal_id' => $this->integer()->notNull(),
|
||||
'entry_type' => $this->string(32)->notNull(),
|
||||
'medical_visit_id' => $this->integer()->null(),
|
||||
'progress_update_id' => $this->integer()->null(),
|
||||
'created_at' => $this->dateTime()->null(),
|
||||
'updated_at' => $this->dateTime()->null(),
|
||||
]);
|
||||
|
||||
$this->safeCreateIndex('idx_rescue_animal_stream_entry_animal', 'rescue_animal_stream_entry', 'animal_id', false);
|
||||
$this->safeCreateIndex('idx_rescue_animal_stream_entry_type', 'rescue_animal_stream_entry', 'entry_type', false);
|
||||
$this->safeCreateIndex('idx_rescue_animal_stream_entry_medical', 'rescue_animal_stream_entry', 'medical_visit_id', true);
|
||||
$this->safeCreateIndex('idx_rescue_animal_stream_entry_progress', 'rescue_animal_stream_entry', 'progress_update_id', true);
|
||||
|
||||
$this->safeAddForeignKey(
|
||||
'fk_rescue_animal_stream_entry_animal',
|
||||
'rescue_animal_stream_entry',
|
||||
'animal_id',
|
||||
'rescue_animal',
|
||||
'id',
|
||||
'CASCADE',
|
||||
'CASCADE'
|
||||
);
|
||||
|
||||
$medicalVisitTable = $this->db->getSchema()->getTableSchema('rescue_animal_medical_visit', true);
|
||||
if ($medicalVisitTable !== null) {
|
||||
$this->safeAddForeignKey(
|
||||
'fk_rescue_animal_stream_entry_medical',
|
||||
'rescue_animal_stream_entry',
|
||||
'medical_visit_id',
|
||||
'rescue_animal_medical_visit',
|
||||
'id',
|
||||
'CASCADE',
|
||||
'CASCADE'
|
||||
);
|
||||
}
|
||||
|
||||
$progressTable = $this->db->getSchema()->getTableSchema('rescue_animal_progress_update', true);
|
||||
if ($progressTable !== null) {
|
||||
$this->safeAddForeignKey(
|
||||
'fk_rescue_animal_stream_entry_progress',
|
||||
'rescue_animal_stream_entry',
|
||||
'progress_update_id',
|
||||
'rescue_animal_progress_update',
|
||||
'id',
|
||||
'CASCADE',
|
||||
'CASCADE'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function safeDown()
|
||||
{
|
||||
if ($this->db->getSchema()->getTableSchema('rescue_animal_stream_entry', true) !== null) {
|
||||
$this->safeDropTable('rescue_animal_stream_entry');
|
||||
}
|
||||
|
||||
$medicalTable = $this->db->getSchema()->getTableSchema('rescue_animal_medical_visit', true);
|
||||
if ($medicalTable !== null) {
|
||||
if (isset($medicalTable->columns['post_to_space_feed'])) {
|
||||
$this->dropColumn('rescue_animal_medical_visit', 'post_to_space_feed');
|
||||
}
|
||||
|
||||
if (isset($medicalTable->columns['post_to_animal_feed'])) {
|
||||
$this->dropColumn('rescue_animal_medical_visit', 'post_to_animal_feed');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user