WordPress plugin database. How to create table for checkbox

You can add above code on plugin activation hook so that code run whenever you activate plugin.

For checkbox You need to define table column type as Boolean.

Dont forget to check table is already exist or not. otherwise it show error on second activation.