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

Failed to create table #900

Closed
codepgq opened this issue Apr 3, 2019 · 3 comments
Closed

Failed to create table #900

codepgq opened this issue Apr 3, 2019 · 3 comments

Comments

@codepgq
Copy link

codepgq commented Apr 3, 2019

near ":_": syntax error

run(_:_:)  ["CREATE TABLE IF NOT EXISTS \"Room\" (\"id\" INTEGER PRIMARY KEY NOT NULL, \"user_id\" TEXT NOT NULL CHECK (length(\"user_id\") >(_:_:) 0), \"group_id\" TEXT NOT NULL, \"group_dst\" INTEGER NOT NULL, \"group_name\" TEXT NOT NULL, \"created_at\" TEXT NOT NULL DEFAULT (\'\'), \"updated_at\" TEXT NOT NULL DEFAULT (\'\'), \"product_key\" TEXT NOT NULL DEFAULT (\'\'), \"verbose_name\" TEXT NOT NULL DEFAULT (\'\'), \"gw_did\" TEXT NOT NULL DEFAULT (\'\'), \"remark\" TEXT NOT NULL DEFAULT (\'\'), \"info\" TEXT NOT NULL DEFAULT (\'null\'))", near ":_": syntax error (code: 1)]
@codepgq codepgq changed the title Create Table Failed to create table Apr 3, 2019
@codepgq
Copy link
Author

codepgq commented Apr 3, 2019

let creatSql = EIQPictureTable.create(temporary: false, ifNotExists: true, withoutRowid: false) { (table) in
            
            table.column(colunm.id, primaryKey: true)
            table.column(colunm.user_id, check: colunm.user_id.length > 0)
            table.column(colunm.picturePath, check: colunm.picturePath.length > 0)
            table.column(colunm.isAdd)
            table.column(colunm.created_at)
            table.column(colunm.updated_at)
        }
        DataBase.run(creatSql)

An error occurs when I check the length of a column

@ChaosTong
Copy link

real problem is in #888, and you can try #895 solution, and you need to clean builded framework

@ypopovych
Copy link
Collaborator

Fixed in the new version.

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

3 participants