Add a few fields to a sqlite db for a complete noob tiny baby

Hi everyone -

I have googled for days. I have searched and started at least 8 tutorials, including trying mongo db. I then realized that sqlite was a starter kit on glitch, the basic starter project has 50% of what I need to do. I found one that uses sequalize and sqlite.

I’m a student doing a project with a very short timeline. I haven’t done database in years and I can’t remember anything. I’m having a particularly hard time figuring out how to use it on glitch.

I need to make a simple comment-type form. I need to post it on three static pages, think three blog posts with different comments on each page. No authorization required, anon posting is ok.

I know I’m missing something obvious. This shouldn’t be this difficult. I have no idea where I can see the ORM, or if that’s even a thing in glitch?

My project is here: https://glitch.com/edit/#!/commentsgen
Any help is appreciated. Feel free to call me a dumdum, I’m feeling like it right now!

1 Like

Hi @k8hansen, welcome to the Glitch forum! We’re all new at something so you’re in good company!

If you’re using SQLite as shown in this project, to add a column to an existing table you add properties to the JavaScript object that describes (defines) the table you’re adding to. The User block that starts here defines the users table in your project’s database. If you make a change, when you’re ready to update your table you’d change {force: false} to {alter: true} here, which will tell SQLite to change your database to match the changes you made to the User block. If you want to prevent future changes from accidentally updating your database you can change that back to {force: false} when you’re done.

Hope this helps!

Hey there,
Having problems with learning SQLite? Try out easy-to-use framework of SQLite.
NPM: Click Here!
GitHub: Click Here!

Hi Cori-

This is extremely helpful, thank you for taking the time. (I was trying to delete this question, is there no delete option for forum messages?)

Regardless, this answer was exactly what I was looking for. I still have a lot to learn and a long way to go, but I look forward to using your answer as a starting point.

We’re excited to host our student project on Glitch! We love this tool.

2 Likes

I’m glad we could help, and we’re super excited to host your project!

Generally we discourage deleting questions from the forum because you never know who might find useful information in someone else’s answer.

Happy Glitching!

1 Like