We want to connect the people who have knowledge to the people who need it, to bring together people with different perspectives so they can understand each other better, and to empower everyone to share their knowledge.
CREATE TABLE IF NOT EXISTS ezy_users ( id bigint unsigned NOT NULL AUTO_INCREMENT, uuid varchar(128) COLLATE utf8mb4_unicode_520_ci NOT NULL, username varchar(128) COLLATE utf8mb4_unicode_520_ci NOT NULL, display_name varchar(250) COLLATE utf8mb4_unicode_520_ci, password varchar(255) COLLATE utf8mb4_unicode_520_ci NOT NULL, email varchar(120) COLLATE utf8mb4_unicode_520_ci, phone varchar(20) COLLATE utf8mb4_unicode_520_ci, url varchar(120) COLLATE utf8mb4_unicode_520_ci, avatar_image_id bigint, cover_image_id bigint, activation_key varchar(255) COLLATE utf8mb4_unicode_520_ci, status varchar(25) COLLATE utf8mb4_unicode_520_ci NOT NULL DEFAULT 'INACTIVATED', created_at datetime NOT NULL DEFAULT '2021-01-01 00:00:00', updated_at datetime NOT NULL DEFAULT '2021-01-01 00:00:00', PRIMARY KEY (id), UNIQUE KEY key_uuid (uuid), UNIQUE KEY key_username (username), UNIQUE KEY key_email (email), UNIQUE KEY key_phone (phone), UNIQUE KEY key_activation_key (activation_key), INDEX index_status (status), INDEX index_created_at (created_at) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; CREATE TABLE IF NOT EXISTS ezy_user_role_names ( id bigint unsigned NOT NULL AUTO_INCREMENT, name varchar(45) NOT NULL COLLATE utf8mb4_unicode_520_ci NOT NULL, display_name varchar(60) COLLATE utf8mb4_unicode_520_ci NOT NULL, created_at datetime NOT NULL, updated_at datetime NOT NULL, PRIMARY KEY (id), UNIQUE KEY key_name (name), UNIQUE KEY key_display_name (display_name) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; CREATE TABLE IF NOT EXISTS ezy_user_roles ( role_id bigint unsigned NOT NULL, user_id bigint unsigned NOT NULL, created_at datetime NOT NULL, PRIMARY KEY (role_id, user_id), INDEX index_role_id (role_id), INDEX index_user_id (user_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
roleIds = select id from ezy_user_role_names where name in ('user', 'admin'); delete from ezy_user_roles where userId = ? and role_id in :roleIds
2.2K Point(s)
1.2K Point(s)
313 Point(s)
178 Point(s)
138 Point(s)
Input your email to receive reset password link, or if you remember your password, you can click