Data Base Structure and Migrations

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/7

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

8 Terms

1
New cards

A way to define and manage your database schema (tables and columns) using PHP files. They allow changes to be easily tracked and transferred across different environments (local, production).

What is the concept of Migrations?

2
New cards

database/migrations folder.

Location of Migration files

3
New cards

php artisan migrate (Executes the up() method in all unexecuted migration files).

Artisan command to run migrations

4
New cards

Defines the database schema changes to be applied

Purpose of the up() method in a migration

5
New cards

Defines the database changes to be reversed (e.g., dropping the table that was created in up()).

Purpose of the down() method in a migration

6
New cards

php artisan migrate:rollback

Artisan command to undo the last batch of migrations

7
New cards

Stores the history of which migrations have been executed, identified by their file name and a batch number.

Purpose of the migrations DB table

8
New cards

$table->timestamps();

Shorthand for created_at and updated_at columns