Git Product home page Git Product logo

Comments (3)

cornelinux avatar cornelinux commented on June 8, 2024

Steps to reproduce:

Have a system on the previous version:

./pi-manage db stamp 5cb310101a1f

Remove nodename table from DB.

Now add the nodename table:

./pi-manage db upgrade e3a64b4ca634

Works.

Now try to add the node_uuid:

./pi-manage db upgrade d0e7144947d0

Result:

Running online
(sqlite3.OperationalError) near "ALTER": syntax error
[SQL: ALTER TABLE nodename ALTER COLUMN id TYPE VARCHAR(36)]
(Background on this error at: https://sqlalche.me/e/14/e3q8)

from privacyidea.

plettich avatar plettich commented on June 8, 2024

Unfortunately SQLite does not support ALTER TABLE statements which change the type of the column:
https://www.sqlite.org/lang_altertable.html#making_other_kinds_of_table_schema_changes
We can add render_as_batch=True to the context.configure here:

context.configure(

but i'll have to check whether this impacts the migration of other DBMs
(Source: https://stackoverflow.com/questions/30378233/sqlite-lack-of-alter-support-alembic-migration-failing-because-of-this-solutio)

from privacyidea.

nilsbehlen avatar nilsbehlen commented on June 8, 2024

Merge migration scripts

from privacyidea.

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.