database updates from the other day

this SQL is what I've been using with the new App/Create updates