function rafm_phase2_tables(){ global $wpdb; $charset = $wpdb->get_charset_collate(); require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); /* SUITS TABLE (Each suit tracked individually) */ $sql_suits = "CREATE TABLE {$wpdb->prefix}rafm_suits ( id BIGINT AUTO_INCREMENT PRIMARY KEY, order_id BIGINT, suit_name VARCHAR(255), size VARCHAR(50), status VARCHAR(50) ) $charset;"; /* SUIT STAGES */ $sql_stages = "CREATE TABLE {$wpdb->prefix}rafm_suit_stages ( id BIGINT AUTO_INCREMENT PRIMARY KEY, suit_id BIGINT, stage VARCHAR(50), worker_id BIGINT, start_time DATETIME, end_time DATETIME, delay INT DEFAULT 0 ) $charset;"; /* LEATHER USAGE PER SUIT */ $sql_usage = "CREATE TABLE {$wpdb->prefix}rafm_leather_usage ( id BIGINT AUTO_INCREMENT PRIMARY KEY, suit_id BIGINT, color VARCHAR(50), sqft DECIMAL(10,2) ) $charset;"; /* PIECEWORK LOG */ $sql_piecework = "CREATE TABLE {$wpdb->prefix}rafm_piecework ( id BIGINT AUTO_INCREMENT PRIMARY KEY, worker_id BIGINT, suit_id BIGINT, stage VARCHAR(50), quantity INT, earnings DECIMAL(10,2) ) $charset;"; dbDelta($sql_suits); dbDelta($sql_stages); dbDelta($sql_usage); dbDelta($sql_piecework); } register_activation_hook(__FILE__, 'rafm_phase2_tables'); Hello world! – rafactory.com

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

Comments

One response to “Hello world!”

  1. A WordPress Commenter Avatar

    Hi, this is a comment.
    To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
    Commenter avatars come from Gravatar.

Leave a Reply

Your email address will not be published. Required fields are marked *