vibern0/POS-System

code to create database layout seems to be missing

Closed this issue · 7 comments

Hi obernardovieira,

it looks like the code to "create" all the sqllite tables is missing.
I can see the login screen but thats it:

   File "/POS-System/src/database/db.py", line 48, in isValidLogin
     cursor = self.db.execute(query)
 sqlite3.OperationalError: no such table: users

Also, how do I get to the "administrator" console ?

oh, and here is the requirements.txt for ubuntu16.04 pip3

cython
kivy
pygame
pillow

#sudo apt-get install xclip

I wanted to use your example to play around with kivy as I am looking
to build a POS system myself...

Same problem here..

Sorry, I did not see this before.
I will recover this, I started already. Maybe today or tomorrow I will commit the fix.
So far, let me explain to things. This was one of my first projects on GitHub and was a long time ago. I was learning python, and it was built using python 2.7.

At some point, I left it without finishing. I'm sorry, I will fix it in the coming days.
Thank you guys for this.

Great, thanks @obernardovieira .
Also, if you got the time to look at this PullRequest, I made a fix with some indentation issues: #24

I am interested in this project and have some experience with python and REST in POS systems.
cc: @schulmenueplaner-de @daveawalker

You guys should be able to run the script https://github.com/obernardovieira/POS-System/blob/master/src/database/schema.sql and then inject a user and a products, for example

INSERT INTO `users` VALUES ('bernardo','123');
INSERT INTO `products` VALUES ('Roasted Pear','appetizers',3,2);

I will write it somewhere

Also, I thought that I might change a lot of stuff so I did a new branch and a PR #25
Please have a look and comment. As I said there, I don't work with it professionally and I also know that this app has bugs.

Depending on how interested you guys are, we can move on.

Sure. I reviewed it (linting and readme).
Also, the following inserts work for me:

INSERT INTO products (name, type, stock, price) VALUES ('Product XYZ','meat',5,30);
INSERT INTO users (name,password) VALUES ('admin1','admin1');

Ok, this is now solved. Updates are on README file.
Thanks.