Coder Social home page Coder Social logo

Comments (12)

Aetherinox avatar Aetherinox commented on June 23, 2024 1

I don't know what is going on, but I found the opengist.db file, and it is almost impossible to edit. Docker is shut down just so the file wasn't in-use by chance.

Tried opening in DB Lite browser, and all it says is "unable to open database". Even set the file ownership to root as a last ditch measure to ensure security wasn't a problem, and it refuses to open. Which is how I normally edit the DBs, guess I'll try sqlite3

Yeah, sqlite3 doesn't work either. It complains about it being a read-only database, despite the permissions being set to ridiuclous levels.

I chmod 0755 to the entire folder with the DB, and then it complains that it just can't open the database.

Edit: I got it, but it was a royal pain. After I set the permissions and chown the entire folder to the user, it would not let me edit it using terminal's sqlite3, however, I could then go back into the DB Lite browser and make the changes that way. Makes no sense, but that was the most pain in the rear process I've ever had with a database. Not sure what is up with it. Never seen that before.

from opengist.

Aetherinox avatar Aetherinox commented on June 23, 2024 1

lol, saw your reaction. No worries, I managed to get the admin added, my system for some reason just made it a god awful pain. I know it's not your fault.

Just something to do with however it's set up, and sqlite3.

A setting later might be great. I'd hate to do that again, but I know you're busy with stuff. I'm just happy the other issue with literal newlines being fixed.

from opengist.

thomiceli avatar thomiceli commented on June 23, 2024

Yeah this would be a good addition, for now it's simply UPDATE users SET is_admin = 1 WHERE id = ? in sqlite

from opengist.

Aetherinox avatar Aetherinox commented on June 23, 2024

Ah, you mean manually editing the opengist .db file using sqlite. I assume opengist would need to be shut down and restarted before and after the edit.

Yeah, a feature like that would be awesome.

from opengist.

thomiceli avatar thomiceli commented on June 23, 2024

It doesn't need to be restarted actually

from opengist.

thomiceli avatar thomiceli commented on June 23, 2024

Actually i tried to open the database on a Windows machine (running WSL) and it was locked aswell, I will investigate but it's prob a library issue.
No issues on unix

from opengist.

Aetherinox avatar Aetherinox commented on June 23, 2024

That's weird, I had the opposite. Windows worked right out of box, Linux was locked as read-only. I wanted to use sqlite3 through command-line since it's easier to just run a command, but the only way I could get it to work was downloading the appimage for the SQLite Database manager.

from opengist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.