[bug] 初始化数据库时,找不到对应的表

[bug] mimemagic相关问题
ERROR 1146 (42S02) at line 3453: Table 'dev_forgeplus.ci_languages' doesn't exist
ERROR 1146 (42S02) at line 3515: Table 'dev_forgeplus.ci_templates' doesn't exist
This commit is contained in:
td-peanut 2021-05-17 14:27:57 +08:00
parent 60b22b3912
commit 2a284e107f
8 changed files with 33 additions and 46 deletions

View File

@ -176,7 +176,9 @@ GEM
mimemagic (~> 0.3.2)
maruku (0.7.3)
method_source (0.9.2)
mimemagic (0.3.4)
mimemagic (0.3.10)
nokogiri (~> 1)
rake
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.0)

View File

@ -1,11 +0,0 @@
class CreateDevOpsLanguages < ActiveRecord::Migration[5.2]
def change
create_table :dev_ops_languages do |t|
t.string :name, null: false, comment: 'The name of project language.'
t.text :content, null: false, comment: 'The content of project language.'
t.integer :usage_amount, default: 0, comment: 'number of people Using the language'
t.timestamps
end
end
end

View File

@ -1,5 +0,0 @@
class AddCoverIdToDevOpsLanguages < ActiveRecord::Migration[5.2]
def change
add_column :dev_ops_languages, :cover_id, :integer
end
end

View File

@ -1,5 +0,0 @@
class RenameDevOpsLanguageToCiLanguage < ActiveRecord::Migration[5.2]
def change
rename_table :dev_ops_languages, :ci_languages
end
end

View File

@ -1,14 +0,0 @@
class CreateCiTemplates < ActiveRecord::Migration[5.2]
def change
create_table :ci_templates do |t|
t.string :template_name, null: false, comment: '模板名称'
t.string :stage_type, null: false, comment: '模板所属阶段类型init/build/deploy/customize/confirm'
t.string :category, null: false, comment: '模板分类'
t.text :content, null: false, comment: '模板yml内容'
t.timestamps
end
add_index :ci_templates, [:stage_type]
end
end

View File

@ -1,5 +0,0 @@
class AddParentCategoryToCiTemplates < ActiveRecord::Migration[5.2]
def change
add_column :ci_templates, :parent_category, :string
end
end

View File

@ -1,5 +0,0 @@
class AddLoginToCiTemplates < ActiveRecord::Migration[5.2]
def change
add_column :ci_templates, :login, :string
end
end

View File

@ -3411,6 +3411,36 @@ CREATE TABLE `laboratory_users` (
KEY `index_laboratory_users_on_user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for ci_languages
-- ----------------------------
DROP TABLE IF EXISTS `ci_languages`;
CREATE TABLE `ci_languages` (
`id` bigint NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL COMMENT 'The name of project language.',
`content` text NOT NULL COMMENT 'The content of project language.',
`usage_amount` int DEFAULT '0' COMMENT 'number of people Using the language',
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`cover_id` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `ci_templates`;
CREATE TABLE `ci_templates` (
`id` bigint NOT NULL AUTO_INCREMENT,
`template_name` varchar(255) NOT NULL COMMENT '模板名称',
`stage_type` varchar(255) NOT NULL COMMENT '模板所属阶段类型init/build/deploy/customize/confirm',
`category` varchar(255) NOT NULL COMMENT '模板分类',
`content` text NOT NULL COMMENT '模板yml内容',
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`parent_category` varchar(255) DEFAULT NULL,
`login` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `index_ci_templates_on_stage_type` (`stage_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of laboratories
-- ----------------------------