-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimportant_notes_for_db_migration_table.txt
136 lines (87 loc) · 5.05 KB
/
important_notes_for_db_migration_table.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
Template ID :
1207162824551707819
Template Name :
mandal register otp
php artisan make:migration create_building_noc_table --table=building_noc
php artisan make:migration create_hospital_noc_table --table=hospital_noc
===================== Create New Column in Laravel Migration Table
php artisan make:migration create_hospital_noc_table
php artisan make:migration create_building_noc_table
===================== Add New Column in Laravel Migration Table
php artisan make:migration add_business_noc_table --table=business_noc
php artisan make:migration add_building_noc_table --table=building_noc
php artisan make:migration add_hospital_noc_table --table=hospital_noc
php artisan migrate --path=database/migrations/2023_09_25_165919_create_fee_mode_operate_table.php
php artisan make:migration add_fee_receipt_documents_table --table=fee_receipt_documents
==================== Run Database Seeder Run Command
php artisan db:seed --class=ProductTableSeeder
Example :- php artisan db:seed --class=UsersTableSeeder
php artisan db:seed --class=CitizensTableSeeder
===================== Git basic command is given below :
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
===================== create new migration table ======================
php artisan make:migration create_fee_construction_table
php artisan make:migration create_fee_mode_operate_table
php artisan make:migration create_fee_category_table
php artisan make:migration create_fee_bldg_ht_table
php artisan make:migration create_master_fees_table
===================== create new Controllers ======================
php artisan make:controller Admin/FeeConstructionController --model=FeeConstruction
php artisan make:controller Admin/FeeModeOperateController --model=FeeModeOperate
php artisan make:controller Admin/FeeCategoryController --model=FeeCategory
php artisan make:controller Admin/FeeBldgHtController --model=FeeBldgHt
php artisan make:controller Admin/FeeMasterController --model=FeeMaster
php artisan make:controller Admin/SignatureController --model=Signature
php artisan make:controller Admin/FeeModeOperateController --resource
====================== Assign for forinekey in Laravel
$table->foreignIdFor(ConstructionForm::class)->constrained()->cascadeOnDelete()->cascadeOnUpdate(); //=== Apply When do you have model
$table->foreignId('construction_form_id')->constrained(); //=== Apply When do you using DB:table('table_name');
$table->foreign('construction_form_id')->references('id')->on('construction_forms'); //=== Apply When don't using proper DB:table('table_name');
===================== create Migration With Model ======================
php artisan make:model FeeConstruction -m
php artisan make:model FeeModeOperate -m
php artisan make:model FeeBldgHt -m
php artisan make:model FeeCategory -m
php artisan make:model FeeMaster -m
php artisan make:model CitizenPayment -m
===================== Create Resource Controllers ======================
php artisan make:controller Admin/FeeConstructionController --resource
php artisan make:controller Admin/FeeModeOperateController --resource
php artisan make:controller Admin/FeeBldgHtController --resource
php artisan make:controller Admin/FeeCategoryController --resource
php artisan make:controller Admin/FeeMasterController --resource
php artisan make:controller Admin/SignatureController --resource
composer install --ignore-platform-reqs
composer update --ignore-platform-reqs
====== Show Total Branch or Highlight The Current Working Branch
git branch
====== Create New Branch
git checkout -b (branch-name)
====== Switch Curent Branch to Other Branch
git checkout (branch-name)
======= Add All / Specific file in git
git add . (for all files)
git add filename.txt, filename2.txt
======= Revert back it revert 1234567890abcdef
git reset --hard e16d77b431a56588083c2c5f3661abb2f50c8701
============ Remove Column Name By Migration Table
php artisan make:migration remove_construction_plan_doc_from_building_noc --table=building_noc
php artisan make:migration change_hospital_noc_location_doc_coloumn_null_hospital_noc_table --table=hospital_noc
php artisan make:migration change_citizen_payments_coloumn_type_citizen_payments_table --table=citizen_payments
====== Install Laravel User Activity
composer require haruncpi/laravel-user-activity --ignore-platform-req=php
OR
composer require haruncpi/laravel-user-activity
php artisan user-activity:install
use Haruncpi\LaravelUserActivity\Traits\Loggable;
use Loggable;
php artisan user-activity:delete
composer remove haruncpi/laravel-user-activity --ignore-platform-req=php
php artisan serve --host=192.168.0.150
============================================================================================================
For add_column_to_table_name
============================================================================================================
php artisan make:migration add_column_to_business_noc --table=business_noc
php artisan make:migration add_column_to_building_noc --table=building_noc
php artisan make:migration add_column_to_hospital_noc --table=hospital_noc