So before we go too much further, it might be useful to have some data in the database that we can
work with for the rest of this course.
And right now I'm looking at the Web page for SOTA, a tool that we'll use for database migration's.
And you may have a different tool.
You prefer to use and use whatever works for you, but I'm going to use SOTA in this course and SOTA
is developed as part of the Go Buffalo Web application framework that a lot of people use.
I'm not particularly fond of Go Buffalo.
It's a good project.
Don't get me wrong.
It's just not the sort of thing that I like to work with.
But any case, Pop is very good.
So the installation instructions are right here and I have a link to this in the course resources for
this lecture.
So install it.
If you're on a Mac and have homebrew installed, it's trivial.
And if you want to install it from source, that's pretty easy to.
We're not using sequel lite.
So these are the lines you will use right here.
Now, once you've done that, make sure that it's installed in a place that's part of your path.
And if you've been working with go for a while, I'm sure you're familiar with that.
In any case, once you have it installed, you'll find another file on the course resources for this
lecture called Migration's.
Download that, unzip it and open it up.
Now, I've already got a copy downloaded, obviously, and I've opened it up in my favorite text editor,
the contents of that folder.
And the first thing I'll do is open database.
Why Emelle?
And I'll fill in my username and password here.
And mine was Treva and my password is secret.
So put in your username and password and save that.
Now I need to get rid of the one widgets table that I have in the database.
So I'll go back to school, I'll connect to that database and I will simply delete the widgets table,
so I'll delete that.
And once that's deleted, I have an empty database with no tables.
Now I'll open my favorite terminal program and I will go to the folder where everything is unzipped
and I put one of my desktop.
So it's right there and it's called Migration's.
And inside of it I have my database email, which I just modified to put in the username and password
and all I do is run sota migrate and it should create all of the tables and populate them with some
data.
So let's go back to school days and refresh this.
I know they're so we have an orders table with nothing in it, we have a scheme of migration which keeps
track of our database migrations and that was added by soda.
And we have some statuses for transactions.
We have some transaction and empty transactions table.
We have one user will be using when we actually put authentication into our application and we have
a widgets table but now has more than two columns and has one widget in there.
OK, so this gets us started.
So now we can actually go write some database routines to interact with the database and we'll get started
on that in the next lecture.