我有一个名为persons
的MySQL数据库表。该表有两个枚举字段。在PhpMyAdmin中,它们是枚举。但是,PhpStorm将它们显示为char。
以下是PhpMyAdmin的导出:
--
-- Database: `underdog`
--
-- --------------------------------------------------------
--
-- Table structure for table `persons`
--
CREATE TABLE `persons` (
`person_id` bigint(20) UNSIGNED NOT NULL COMMENT 'ID for each person',
`username` varchar(12) CHARACTER SET ascii DEFAULT NULL,
`email` varchar(110) CHARACTER SET ascii DEFAULT NULL,
`created` bigint(20) UNSIGNED DEFAULT NULL,
`password` varchar(250) CHARACTER SET ascii COLLATE ascii_bin DEFAULT NULL,
`notetoself` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'Personal notes of user',
`is_blocked` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
`phptimezone` varchar(400) CHARACTER SET ascii DEFAULT NULL COMMENT 'example America/New_York',
`mobile_phone` varchar(10) CHARACTER SET ascii DEFAULT NULL COMMENT 'Mobile phone number',
`country_phonecode` varchar(6) CHARACTER SET ascii NOT NULL DEFAULT '1' COMMENT 'Prepend for country',
`membership_level` enum('Platinum','Gold','Silver','Bronze') CHARACTER SET ascii NOT NULL DEFAULT 'Bronze',
`realname` varchar(110) CHARACTER SET utf8 COLLATE utf8_swedish_ci DEFAULT NULL COMMENT 'Full name',
`karma_level` enum('5 Star','4 Star','3 Star','2 Star','1 Star') CHARACTER SET ascii NOT NULL DEFAULT '5 Star',
`times_blocked` mediumint(8) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Number of times this person has been blocked'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `persons`
--
ALTER TABLE `persons`
ADD PRIMARY KEY (`person_id`),
ADD UNIQUE KEY `username` (`username`),
ADD UNIQUE KEY `email` (`email`),
ADD UNIQUE KEY `mobile_phone` (`mobile_phone`);
--
-- AUTO_INCREMENT for dumped tables
--
答案 0 :(得分:2)
此问题已于1。5年前修复 - DBE-401。
考虑到您使用的是最新的2017.1 EAP版本..这必须归功于您当前的设置。
根据您的YouTube视频 - 请在数据来源的Introspect using JDBC metadata
标签处停用Options
选项。