0

I started using Peewee for a project to store some information, and I am wondering if there is a way to import the local database into phpmyadmin to be able to better view and interact with the stored data. I created my db like so:

from peewee import *

db = SqliteDatabase('trains.db')

class Train(Model):
    id = AutoField()
    origin = CharField()
    destination = CharField()
    due = TimeField()
    delay = IntegerField()
    est = TimeField()
    cancelled = BooleanField()
    day = CharField()

    class Meta:
        database = db

db.connect()
db.create_tables([Train])

train = Train(origin="LNC", destination="Sheffield", due="17:49", delay=0, est="17:49", cancelled=False,day="monday")
success = train.save()
print(success)


db.close()

This creates a .db file which is not importable to phpmyadmin (I have XAMPP 3.2.4). I came across to SQLite->MySQL converters but they seem to be out of date and I'm not sure if I should just not even use SQLite, as I will have to look at the database in some nicer, visual form.

4
  • how many databases , tables , rows and columns we are talking ? Commented Dec 9, 2019 at 20:05
  • 1
    can't you use database editor like dbeaver or SQLiteBrowser to see database ? There should be even extenison for Firefox to work with SQLite. Probably should be extension also for Chrome. Commented Dec 9, 2019 at 20:34
  • @furas wow I never came across this, this is exactly what I was looking for, thank you! Commented Dec 9, 2019 at 20:47
  • There's also github.com/coleifer/sqlite-web Commented Dec 9, 2019 at 22:25

1 Answer 1

1

Instead of phpmyadmin you can use database editor like SQLiteBrowser

enter image description here


DBeaver can works with different databases so you can use it at the same time with SQLite and MySQL. It has many functions but I don't rembere if it can transfer data from one type of database to another.

enter image description here

enter image description here

enter image description here


There are even extensions for web browser Firefox like SQLite Manager.

Chrome should have similar extensions.

BTW: Firefox and Chrome keep some informations (ie. bookmarks) in SQLite files.


Long time ago I was using also HeidiSQL but it can't work with SQLite.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.