Skip to content

Default value for BOOL #153

@Yogurt4

Description

@Yogurt4

WP Version: 6.8.3
PG4WP Version: 3.4.1

Error:

WordPress database error ERROR:  column "specified" is of type boolean but default expression is of type integer
HINT:  You will need to rewrite or cast the expression. for query 

RAW SQL

CREATE TABLE wp_pmxi_posts (
        id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
        post_id BIGINT(20) UNSIGNED NOT NULL,
        import_id BIGINT(20) UNSIGNED NOT NULL,
        unique_key TEXT,
        product_key TEXT,
        iteration BIGINT(20) NOT NULL DEFAULT 0,
        specified BOOL NOT NULL DEFAULT 0,
        PRIMARY KEY  (id)  
)

Expected Rewritten SQL

CREATE TABLE wp_pmxi_posts (
        id BIGINT NOT NULL AUTO_INCREMENT,
        post_id BIGINT NOT NULL,
        import_id BIGINT NOT NULL,
        unique_key TEXT,
        product_key TEXT,
        iteration BIGINT NOT NULL DEFAULT 0,
        specified BOOL NOT NULL DEFAULT FALSE,
        PRIMARY KEY  (id)  
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions