WEBVTT

1
00:00:00.370 --> 00:00:01.830
<v Jose>Hi guys and welcome back.</v>

2
00:00:01.830 --> 00:00:04.130
In this video I wanted to tell you about diffs

3
00:00:04.130 --> 00:00:07.010
and how we can check for changes in code.

4
00:00:07.010 --> 00:00:09.220
I also wanted to share with all the changes

5
00:00:09.220 --> 00:00:10.600
that we've made in this section

6
00:00:10.600 --> 00:00:13.700
to migrate our movie watchlist app over to Postgres.

7
00:00:13.700 --> 00:00:14.783
So let's get to it.

8
00:00:15.620 --> 00:00:17.420
What I've got here, is something I've linked

9
00:00:17.420 --> 00:00:20.720
in the resources section of this lecture, is a diff.

10
00:00:20.720 --> 00:00:23.100
Diffs are widely used in programming,

11
00:00:23.100 --> 00:00:25.303
especially when you're using things like GitHub,

12
00:00:25.303 --> 00:00:29.100
and they show you what was removed and what was added.

13
00:00:29.100 --> 00:00:30.680
So here on the left we've got

14
00:00:30.680 --> 00:00:33.320
what was removed from database.py

15
00:00:33.320 --> 00:00:35.800
and here on the right we've got what was added

16
00:00:35.800 --> 00:00:37.360
to database.py.

17
00:00:37.360 --> 00:00:40.030
So if you've got any trouble whatsoever in this section,

18
00:00:40.030 --> 00:00:42.160
you can always double check this diff

19
00:00:42.160 --> 00:00:44.510
and see what changes we made.

20
00:00:44.510 --> 00:00:47.060
As you can see, we removed the word SQLite three

21
00:00:47.060 --> 00:00:48.610
from line two, for example,

22
00:00:48.610 --> 00:00:51.440
and instead we replaced it with psycopg2.

23
00:00:51.440 --> 00:00:53.312
Similarly, we then added a couple new lines

24
00:00:53.312 --> 00:00:55.970
and then we changed integer for serial,

25
00:00:55.970 --> 00:00:58.830
we changed all the question marks for percent S's,

26
00:00:58.830 --> 00:01:00.960
then we changed the connection to use

27
00:01:00.960 --> 00:01:02.930
the environment variable,

28
00:01:02.930 --> 00:01:05.363
and then we used cursors throughout.

29
00:01:06.540 --> 00:01:08.530
Again, feel free to go through this.

30
00:01:08.530 --> 00:01:11.060
I've got this in the resources section of this lecture

31
00:01:11.060 --> 00:01:13.400
and I think this is really helpful a way

32
00:01:13.400 --> 00:01:14.980
to see the differences in code,

33
00:01:14.980 --> 00:01:17.200
and again, widely used.

34
00:01:17.200 --> 00:01:19.460
So thank you guys for joining me in this section.

35
00:01:19.460 --> 00:01:21.810
I hope that everything's clear so far.

36
00:01:21.810 --> 00:01:23.710
If you have any questions, feel free to ask

37
00:01:23.710 --> 00:01:27.320
or join our Discord server and we can help you out as well.

38
00:01:27.320 --> 00:01:29.653
Thanks guys, I'll see you in the next video.

