WEBVTT 00:02.020 --> 00:06.400 So before we go too much further, it might be useful to have some data in the database that we can 00:06.400 --> 00:07.950 work with for the rest of this course. 00:08.530 --> 00:14.230 And right now I'm looking at the Web page for SOTA, a tool that we'll use for database migration's. 00:14.230 --> 00:15.430 And you may have a different tool. 00:15.430 --> 00:20.020 You prefer to use and use whatever works for you, but I'm going to use SOTA in this course and SOTA 00:20.020 --> 00:25.750 is developed as part of the Go Buffalo Web application framework that a lot of people use. 00:26.080 --> 00:28.000 I'm not particularly fond of Go Buffalo. 00:28.000 --> 00:29.050 It's a good project. 00:29.050 --> 00:29.950 Don't get me wrong. 00:29.950 --> 00:32.770 It's just not the sort of thing that I like to work with. 00:32.890 --> 00:34.650 But any case, Pop is very good. 00:35.230 --> 00:39.730 So the installation instructions are right here and I have a link to this in the course resources for 00:39.730 --> 00:40.360 this lecture. 00:40.780 --> 00:41.560 So install it. 00:41.560 --> 00:44.350 If you're on a Mac and have homebrew installed, it's trivial. 00:44.590 --> 00:47.650 And if you want to install it from source, that's pretty easy to. 00:47.680 --> 00:49.000 We're not using sequel lite. 00:49.240 --> 00:51.620 So these are the lines you will use right here. 00:52.060 --> 00:57.370 Now, once you've done that, make sure that it's installed in a place that's part of your path. 00:57.640 --> 01:00.840 And if you've been working with go for a while, I'm sure you're familiar with that. 01:01.360 --> 01:06.790 In any case, once you have it installed, you'll find another file on the course resources for this 01:06.790 --> 01:08.380 lecture called Migration's. 01:08.410 --> 01:11.790 Download that, unzip it and open it up. 01:11.800 --> 01:17.560 Now, I've already got a copy downloaded, obviously, and I've opened it up in my favorite text editor, 01:17.560 --> 01:19.090 the contents of that folder. 01:19.300 --> 01:22.100 And the first thing I'll do is open database. 01:22.480 --> 01:23.590 Why Emelle? 01:23.890 --> 01:26.320 And I'll fill in my username and password here. 01:26.320 --> 01:29.620 And mine was Treva and my password is secret. 01:30.970 --> 01:33.460 So put in your username and password and save that. 01:34.660 --> 01:38.650 Now I need to get rid of the one widgets table that I have in the database. 01:38.650 --> 01:46.420 So I'll go back to school, I'll connect to that database and I will simply delete the widgets table, 01:46.450 --> 01:47.260 so I'll delete that. 01:48.100 --> 01:51.130 And once that's deleted, I have an empty database with no tables. 01:51.940 --> 01:57.670 Now I'll open my favorite terminal program and I will go to the folder where everything is unzipped 01:57.670 --> 01:58.950 and I put one of my desktop. 01:58.970 --> 02:00.760 So it's right there and it's called Migration's. 02:00.760 --> 02:05.800 And inside of it I have my database email, which I just modified to put in the username and password 02:06.460 --> 02:13.720 and all I do is run sota migrate and it should create all of the tables and populate them with some 02:13.720 --> 02:14.010 data. 02:14.020 --> 02:17.500 So let's go back to school days and refresh this. 02:19.160 --> 02:24.200 I know they're so we have an orders table with nothing in it, we have a scheme of migration which keeps 02:24.200 --> 02:27.190 track of our database migrations and that was added by soda. 02:27.860 --> 02:30.350 And we have some statuses for transactions. 02:30.710 --> 02:33.730 We have some transaction and empty transactions table. 02:33.740 --> 02:39.530 We have one user will be using when we actually put authentication into our application and we have 02:39.530 --> 02:43.880 a widgets table but now has more than two columns and has one widget in there. 02:44.000 --> 02:46.240 OK, so this gets us started. 02:46.250 --> 02:52.160 So now we can actually go write some database routines to interact with the database and we'll get started 02:52.160 --> 02:53.690 on that in the next lecture.