Nuevo plugin Redmine Glossary 0.9.2
This commit is contained in:
parent
5d298a7529
commit
693eb3ee50
72 changed files with 2962 additions and 0 deletions
34
plugins/redmine_glossary/db/migrate/001_create_terms.rb
Executable file
34
plugins/redmine_glossary/db/migrate/001_create_terms.rb
Executable file
|
@ -0,0 +1,34 @@
|
|||
class CreateTerms < ActiveRecord::Migration
|
||||
def self.up
|
||||
# CreateTermCategories
|
||||
create_table :term_categories, :force => true do |t|
|
||||
t.column :project_id, :integer, :default => 0, :null => false
|
||||
t.column :name, :string, :default => '', :null => false
|
||||
t.column :position, :integer, :default => 1
|
||||
end
|
||||
|
||||
add_index "term_categories", ["project_id"], :name => "categories_project_id"
|
||||
|
||||
create_table :terms, :force => true do |t|
|
||||
t.column :project_id, :integer, :default => 0, :null => false
|
||||
t.column :category_id, :integer
|
||||
t.column :author_id, :integer, :default => 0, :null => false
|
||||
t.column :updater_id, :integer
|
||||
t.column :name, :string, :default => '', :null => false
|
||||
t.column :name_en, :string, :default => ''
|
||||
t.column :datatype, :string, :default => ''
|
||||
t.column :codename, :string, :default => ''
|
||||
t.column :description, :text
|
||||
t.column :created_on, :timestamp
|
||||
t.column :updated_on, :timestamp
|
||||
end
|
||||
|
||||
add_index "terms", ["project_id"], :name => "terms_project_id"
|
||||
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :term_categories
|
||||
drop_table :terms
|
||||
end
|
||||
end
|
24
plugins/redmine_glossary/db/migrate/002_create_glossary_styles.rb
Executable file
24
plugins/redmine_glossary/db/migrate/002_create_glossary_styles.rb
Executable file
|
@ -0,0 +1,24 @@
|
|||
class CreateGlossaryStyles < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :glossary_styles do |t|
|
||||
t.column :show_desc, :boolean, :default => false
|
||||
t.column :groupby, :integer, :default => 1
|
||||
t.column :project_scope, :integer, :default => 0
|
||||
t.column :sort_item_0, :string, :default => ''
|
||||
t.column :sort_item_1, :string, :default => ''
|
||||
t.column :sort_item_2, :string, :default => ''
|
||||
t.column :user_id, :integer, :default => 0
|
||||
end
|
||||
|
||||
add_column :terms, :rubi, :string, :default => ''
|
||||
add_column :terms, :abbr_whole, :string, :default => ''
|
||||
|
||||
end
|
||||
|
||||
|
||||
def self.down
|
||||
drop_table :glossary_styles
|
||||
remove_column :terms, :abbr_whole
|
||||
remove_column :terms, :rubi
|
||||
end
|
||||
end
|
14
plugins/redmine_glossary/db/migrate/003_terms_add_columns.rb
Executable file
14
plugins/redmine_glossary/db/migrate/003_terms_add_columns.rb
Executable file
|
@ -0,0 +1,14 @@
|
|||
class TermsAddColumns < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :terms, :tech_en, :string, :default => ''
|
||||
add_column :terms, :name_cn, :string, :default => ''
|
||||
add_column :terms, :name_fr, :string, :default => ''
|
||||
end
|
||||
|
||||
|
||||
def self.down
|
||||
remove_column :terms, :tech_en
|
||||
remove_column :terms, :name_cn
|
||||
remove_column :terms, :name_fr
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue