WEBVTT
Kind: captions
Language: en

00:00:00.030 --> 00:00:06.330
Now that we've added a new model to our
app we need to run the migration so

00:00:06.330 --> 00:00:11.250
Django can create the migrations file
for creating the necessary database

00:00:11.250 --> 00:00:19.650
tables for our model so open up the
terminal or the git bash window and make

00:00:19.650 --> 00:00:26.400
sure the vagrant server is running by
typing vagrant up

00:00:26.400 --> 00:00:27.630
once the vagrant

00:00:27.630 --> 00:00:34.079
server's running type
vagrant ssh to connect and then type cd

00:00:34.079 --> 00:00:40.200
forward slash vagrant to switch to the
vagrant directory then let's activate

00:00:40.200 --> 00:00:50.440
our virtual environment by typing source
tilde forward slash env forward slash bin forward slash

00:00:50.440 --> 00:00:59.090
activate hit enter and then we run our
migrations by typing Python manage dot py

00:00:59.090 --> 00:01:07.590
make migrations this runs the Python
make migrations command with django

00:01:07.590 --> 00:01:15.509
you can see after we ran it that it said created model profile feed item you can

00:01:15.509 --> 00:01:20.729
also see that in our project we have a
new file added to the migrations and

00:01:20.729 --> 00:01:25.470
this contains the migration file that
will create our model in the database

00:01:25.470 --> 00:01:30.810
you see it creates a new model with the
name profile feed item and it adds the

00:01:30.810 --> 00:01:35.430
appropriate fields to the model to
represent our model here so this will

00:01:35.430 --> 00:01:41.140
create the table in the database for our
profile feed item model

00:01:41.140 --> 00:01:42.420
okay so now

00:01:42.420 --> 00:01:47.820
let's go ahead and run this migration to
make the changes to the database so the

00:01:47.820 --> 00:01:51.299
make migrations only creates the
migration file you need to apply the

00:01:51.299 --> 00:01:59.070
changes to the database by typing python
manage dot py migrate once you hit enter

00:01:59.070 --> 00:02:04.430
it will go ahead and apply the new
migration to our database and update our

00:02:04.430 --> 00:02:08.620
sql Lite database to reflect the
changes

00:02:08.620 --> 00:02:10.500
so that's all we need to do

00:02:10.500 --> 00:02:14.870
thank you for watching and I'll see you
in the next video

