Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database tables are missing in the first usage #356

Closed
RussellLuo opened this issue Feb 13, 2016 · 0 comments
Closed

Database tables are missing in the first usage #356

RussellLuo opened this issue Feb 13, 2016 · 0 comments
Assignees
Milestone

Comments

@RussellLuo
Copy link

When using sqlite for storage, there is an error in the first usage:

OperationalError: (sqlite3.OperationalError) no such table: item [SQL: u'SELECT count(*) AS count_1 \nFROM (SELECT item.name AS item_name, item.tag AS item_tag, item.collection_path AS item_collection_path \nFROM item \nWHERE item.collection_path = ?) AS anon_1'] [parameters: ('user',)]

The reason is obvious: in the first usage, the required tables have not been created yet.

As far as I can see, there are two solutions:

  1. Use the command-line utility sqilte3 (provided by sqlite):

    $ sqlite3 radicale.db < schema.sql
    
  2. Use the create_all() method of SQLAlchemy to create tables automatically, and I think this is a better solution

@liZe liZe self-assigned this Feb 13, 2016
@liZe liZe modified the milestone: 2.0 Mar 8, 2016
@liZe liZe closed this as completed Jul 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants