Git Product home page Git Product logo

Comments (7)

eveningkid avatar eveningkid commented on May 22, 2024 3

Hey Antonis,

You are right, it actually tries to create the tables every single time.
I will work on this right now and update this issue.

from denodb.

eveningkid avatar eveningkid commented on May 22, 2024 2

Even with no parameter (and implicit drop: false)?

await db.sync();

sync will by default drop the table if it exists if drop is set to true, and recreate it if does not exist. So I am not sure why it wipes the data every time?

from denodb.

AntouanK avatar AntouanK commented on May 22, 2024 2

yeah, my bad, I forgot the "drop: true".
I removed that and it's fine.

thanks 👍

from denodb.

eveningkid avatar eveningkid commented on May 22, 2024

It should now be functional.
Just remember to use --reload to make sure you get the last library version.

Feel free to get in touch if you're still facing an issue! Or anything else obviously :)

from denodb.

AntouanK avatar AntouanK commented on May 22, 2024

Hey @eveningkid
Thanks for getting a fix to this.
I don't get any errors anymore, but I think it wipes out the table every time I start it :/
Cannot persist any data in the table...

from denodb.

ralyodio avatar ralyodio commented on May 22, 2024

I'm still getting this error. If I use drop: true then data is wiped.

$ deno run  --allow-all index.ts
error: Uncaught (in promise) SqliteError: index email already exists
    return new SqliteError(msg, code);
           ^

if i remove it, then it gripes that table already exists.

from denodb.

slim-hmidi avatar slim-hmidi commented on May 22, 2024

I have the same issue here, with drop it removes the table and recreates it. Without it, it throws an issue that the table already exists.
There is no solution to persist the data of the created tables and not erase them for every server restart?

from denodb.

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.