1
00:00:00,600 --> 00:00:06,690
So one final thing we need to take care of is to add to our migration's something that will seed the

2
00:00:06,690 --> 00:00:07,620
rooms table.

3
00:00:07,630 --> 00:00:13,410
So when we deploy this or rerun our migrations, that we don't have to go in and manually add the tables

4
00:00:13,410 --> 00:00:15,050
or the rooms to the rooms table.

5
00:00:15,540 --> 00:00:16,440
So that's pretty simple.

6
00:00:16,450 --> 00:00:22,440
So I'm going to make sure I'm in the correct directory and I am and I will just say so to generate.

7
00:00:22,440 --> 00:00:28,500
And this time I'm going to generate as a single file, seed rooms, table or whatever you want to call

8
00:00:28,500 --> 00:00:29,160
your migration.

9
00:00:29,280 --> 00:00:34,170
So that generates technophiles and I will go to the up migration.

10
00:00:34,530 --> 00:00:40,080
And what I could do here is I could just manually type an insert statement for each of the rooms that

11
00:00:40,080 --> 00:00:41,400
are in my database right now.

12
00:00:41,820 --> 00:00:42,570
But I'm going to cheat.

13
00:00:42,720 --> 00:00:50,910
I'm going to go over to Beaver and I'm going to go to schemas tables, rooms, and then I'll select

14
00:00:50,910 --> 00:00:52,380
both of these rooms.

15
00:00:52,380 --> 00:00:52,800
Right.

16
00:00:52,800 --> 00:01:00,090
Click on them and choose advance copy, copy as sequel and go back to my migration and just paste that

17
00:01:00,090 --> 00:01:00,320
in.

18
00:01:00,810 --> 00:01:09,540
And now those are actually there and my down migration will be as simple as delete from rooms and that

19
00:01:09,540 --> 00:01:14,580
should do it so I can run those migrations and I'm not going to run them right now because they're actually

20
00:01:14,580 --> 00:01:18,660
already in my database table, but they're all set to go.

21
00:01:18,660 --> 00:01:23,460
And now when we run our migrations down and up, we don't have to worry about going in and adding this

22
00:01:23,460 --> 00:01:24,810
information by hand.
