mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 20:00:49 +08:00
init project
This commit is contained in:
5
db/migrate/20191212110933_add_platform_to_users.rb
Normal file
5
db/migrate/20191212110933_add_platform_to_users.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddPlatformToUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :users, :platform, :string, default: 0
|
||||
end
|
||||
end
|
||||
5
db/migrate/20191213091840_add_gitea_token_to_users.rb
Normal file
5
db/migrate/20191213091840_add_gitea_token_to_users.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddGiteaTokenToUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :users, :gitea_token, :string
|
||||
end
|
||||
end
|
||||
17
db/migrate/20191218015959_create_project_categories.rb
Normal file
17
db/migrate/20191218015959_create_project_categories.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
class CreateProjectCategories < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# create_table :project_categories do |t|
|
||||
# t.string :name
|
||||
# t.integer :position
|
||||
# t.integer :projects_count, :default => 0
|
||||
#
|
||||
# t.timestamps
|
||||
# end
|
||||
|
||||
names = %w(大数据 机器学习 深度学习 人工智能 量子计算 智慧医疗 自动驾驶 其他)
|
||||
names.each do |name|
|
||||
ProjectCategory.find_or_create_by!(name: name)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,7 @@
|
||||
class SortToProjectCategoriesWithPosition < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
ProjectCategory.order(:updated_at).each.with_index(1) do |pc, index|
|
||||
pc.update_column :position, index
|
||||
end
|
||||
end
|
||||
end
|
||||
17
db/migrate/20191218023731_create_project_languages.rb
Normal file
17
db/migrate/20191218023731_create_project_languages.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
class CreateProjectLanguages < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :project_languages do |t|
|
||||
t.string :name
|
||||
t.integer :position
|
||||
t.integer :projects_count, :default => 0
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
names = %w(Ruby C C# C++ HTML Haml CSS JavaScript Python PHP Java JSON JSX Lex Shell Objective-C Cycript Clojure Go Grace Gradle GraphQL Dart Elixir Erlang Perl R Reason Sass Slice SVG)
|
||||
names.each do |name|
|
||||
ProjectLanguage.find_or_create_by!(name: name)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class AddProjectCategoryIdAndProjectLanguageIdToProjects < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :projects, :project_category_id, :integer
|
||||
# add_column :projects, :project_language_id, :integer
|
||||
end
|
||||
end
|
||||
14
db/migrate/20191218092812_create_licenses.rb
Normal file
14
db/migrate/20191218092812_create_licenses.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class CreateLicenses < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :licenses do |t|
|
||||
t.string :name
|
||||
t.text :content
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
dir_url = File.join(Rails.root, "public", "options", "license")
|
||||
GenerateDbService.call(dir_url, 'license')
|
||||
|
||||
end
|
||||
end
|
||||
14
db/migrate/20191218105120_create_ignores.rb
Normal file
14
db/migrate/20191218105120_create_ignores.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class CreateIgnores < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :ignores do |t|
|
||||
t.string :name
|
||||
t.text :content
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
dir_url = File.join(Rails.root, "public", "options", "gitignore")
|
||||
GenerateDbService.call(dir_url, 'ignore')
|
||||
|
||||
end
|
||||
end
|
||||
15
db/migrate/20191220085002_create_composes.rb
Normal file
15
db/migrate/20191220085002_create_composes.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
class CreateComposes < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# create_table :composes do |t|
|
||||
# t.integer :user_id
|
||||
# t.string :title
|
||||
# t.text :description
|
||||
# t.integer :show_mode, default: 0
|
||||
# t.boolean :compose_mode, default: false
|
||||
# t.integer :compose_users_count, default: 0
|
||||
# t.integer :compose_projects_count , default: 0
|
||||
# t.timestamps
|
||||
# end
|
||||
# add_index :composes, [:user_id,:show_mode,:compose_mode]
|
||||
end
|
||||
end
|
||||
12
db/migrate/20191220085133_create_compose_users.rb
Normal file
12
db/migrate/20191220085133_create_compose_users.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CreateComposeUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# create_table :compose_users do |t|
|
||||
# t.integer :user_id
|
||||
# t.integer :compose_id
|
||||
# t.integer :is_manager, default: 0
|
||||
#
|
||||
# t.timestamps
|
||||
# end
|
||||
# add_index :compose_users, [:user_id, :compose_id]
|
||||
end
|
||||
end
|
||||
13
db/migrate/20191220085352_create_compose_projects.rb
Normal file
13
db/migrate/20191220085352_create_compose_projects.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateComposeProjects < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# create_table :compose_projects do |t|
|
||||
# t.integer :user_id
|
||||
# t.integer :project_id
|
||||
# t.integer :compose_id
|
||||
# t.integer :position , default: 0
|
||||
#
|
||||
# t.timestamps
|
||||
# end
|
||||
# add_index :compose_projects, [:user_id, :project_id, :compose_id]
|
||||
end
|
||||
end
|
||||
10
db/migrate/20191220092618_add_user_ref_to_repository.rb
Normal file
10
db/migrate/20191220092618_add_user_ref_to_repository.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class AddUserRefToRepository < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :repositories, :user_id, :integer
|
||||
# add_index :repositories, :user_id
|
||||
|
||||
Project.joins(:repository).find_each do |project|
|
||||
project&.repository&.update_column(:user_id, project&.user_id) unless project&.repository.blank?
|
||||
end
|
||||
end
|
||||
end
|
||||
5
db/migrate/20191223031855_add_gitea_uid_to_users.rb
Normal file
5
db/migrate/20191223031855_add_gitea_uid_to_users.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddGiteaUidToUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :users, :gitea_uid, :integer
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddMirrorUrlToRepositories < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :repositories, :mirror_url, :string
|
||||
end
|
||||
end
|
||||
14
db/migrate/20191224064403_create_issue_tags.rb
Normal file
14
db/migrate/20191224064403_create_issue_tags.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class CreateIssueTags < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# create_table :issue_tags do |t|
|
||||
# t.string :title
|
||||
# t.string :description
|
||||
# t.string :color
|
||||
# t.integer :user_id
|
||||
# t.integer :project_id
|
||||
# t.integer :issues_count,default: 0
|
||||
# t.timestamps
|
||||
# end
|
||||
# add_index :issue_tags, [:user_id, :title,:project_id]
|
||||
end
|
||||
end
|
||||
6
db/migrate/20191225073843_add_indexes_to_users.rb
Normal file
6
db/migrate/20191225073843_add_indexes_to_users.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class AddIndexesToUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_index :users, :login
|
||||
# add_index :users, :mail
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddPraisesCountToProjects < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :projects, :praises_count, :integer, :default => 0
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
class ChangeForkedCountDefaultFromProjects < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
change_column_default :projects, :forked_count, { from: nil, to: 0 }
|
||||
change_column_default :projects, :project_type, { from: nil, to: 0 }
|
||||
|
||||
Project.find_each do |project|
|
||||
project.update_column('forked_count', 0) if project.forked_count.nil?
|
||||
project.update_column('project_type', 0) if project.project_type.nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
8
db/migrate/20191227084951_add_issues_type_and_token.rb
Normal file
8
db/migrate/20191227084951_add_issues_type_and_token.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
class AddIssuesTypeAndToken < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :issues, :issue_type, :string
|
||||
# add_column :issues, :token, :string
|
||||
# add_column :issues, :issue_tag_ids, :string
|
||||
|
||||
end
|
||||
end
|
||||
18
db/migrate/20191227090611_add_issue_priority_to_model.rb
Normal file
18
db/migrate/20191227090611_add_issue_priority_to_model.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
class AddIssuePriorityToModel < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
unless ActiveRecord::Base.connection.table_exists? 'IssuePriority'
|
||||
create_table :issue_priorities do |t|
|
||||
t.string :name
|
||||
t.integer :position
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :issue_priorities, [:name]
|
||||
|
||||
pr_values = %w(低 正常 高 紧急 立刻)
|
||||
pr_values.each_with_index do |v, index|
|
||||
IssuePriority.create!(name: v, position: index+1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
5
db/migrate/20191227105755_rename_issue_tag_title.rb
Normal file
5
db/migrate/20191227105755_rename_issue_tag_title.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class RenameIssueTagTitle < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# rename_column :issue_tags, :title, :name
|
||||
end
|
||||
end
|
||||
10
db/migrate/20191227140150_create_issue_tags_relates.rb
Normal file
10
db/migrate/20191227140150_create_issue_tags_relates.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateIssueTagsRelates < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# create_table :issue_tags_relates do |t|
|
||||
# t.integer :issue_id
|
||||
# t.integer :issue_tag_id
|
||||
# t.timestamps
|
||||
# end
|
||||
# add_index :issue_tags_relates, [:issue_id, :issue_tag_id]
|
||||
end
|
||||
end
|
||||
5
db/migrate/20191227162744_rename_issues_issue_tag_ids.rb
Normal file
5
db/migrate/20191227162744_rename_issues_issue_tag_ids.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class RenameIssuesIssueTagIds < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# rename_column :issues, :issue_tag_ids, :issue_tags_value
|
||||
end
|
||||
end
|
||||
13
db/migrate/20200103062707_create_issue_times.rb
Normal file
13
db/migrate/20200103062707_create_issue_times.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateIssueTimes < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# create_table :issue_times do |t|
|
||||
# t.integer :issue_id
|
||||
# t.integer :user_id
|
||||
# t.datetime :start_time
|
||||
# t.datetime :end_time
|
||||
# t.string :cost_time
|
||||
# t.timestamps
|
||||
# end
|
||||
# add_index :issue_times, [:issue_id, :user_id]
|
||||
end
|
||||
end
|
||||
12
db/migrate/20200103062807_create_issue_depends.rb
Normal file
12
db/migrate/20200103062807_create_issue_depends.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CreateIssueDepends < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :issue_depends do |t|
|
||||
t.integer :user_id
|
||||
t.integer :issue_id
|
||||
t.integer :depend_issue_id
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :issue_depends, [:user_id, :issue_id, :depend_issue_id]
|
||||
end
|
||||
end
|
||||
5
db/migrate/20200103113839_add_is_lock_to_issue.rb
Normal file
5
db/migrate/20200103113839_add_is_lock_to_issue.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddIsLockToIssue < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :issues, :is_lock, :boolean, default: false
|
||||
end
|
||||
end
|
||||
12
db/migrate/20200106022157_create_project_trends.rb
Normal file
12
db/migrate/20200106022157_create_project_trends.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CreateProjectTrends < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :project_trends do |t|
|
||||
t.integer :user_id
|
||||
t.integer :project_id
|
||||
t.references :trend, polymorphic: true, index: true
|
||||
t.string :action_type
|
||||
t.timestamps
|
||||
end
|
||||
add_index :project_trends, [:user_id, :project_id]
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddWatchersCountToProjects < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :projects, :watchers_count, :integer, :default => 0
|
||||
end
|
||||
end
|
||||
18
db/migrate/20200106082806_create_version_releases.rb
Normal file
18
db/migrate/20200106082806_create_version_releases.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
class CreateVersionReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# create_table :version_releases do |t|
|
||||
# t.integer :user_id
|
||||
# t.string :name
|
||||
# t.text :body
|
||||
# t.string :tag_name
|
||||
# t.string :target_commitish
|
||||
# t.boolean :draft, default: false
|
||||
# t.boolean :prerelease, default: false
|
||||
# t.string :tarball_url
|
||||
# t.string :zipball_url
|
||||
# t.string :url
|
||||
# t.string :version_gid
|
||||
# t.timestamps
|
||||
# end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class AddProjectIdToVersionRelease < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :version_releases, :repository_id, :integer
|
||||
# add_index :version_releases, [:repository_id]
|
||||
end
|
||||
end
|
||||
6
db/migrate/20200108015358_add_column_to_issue_tags.rb
Normal file
6
db/migrate/20200108015358_add_column_to_issue_tags.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class AddColumnToIssueTags < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :issue_tags, :gid, :integer
|
||||
# add_column :issue_tags, :gitea_url, :string
|
||||
end
|
||||
end
|
||||
8
db/migrate/20200108025756_add_column_to_pull_requests.rb
Normal file
8
db/migrate/20200108025756_add_column_to_pull_requests.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
class AddColumnToPullRequests < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :pull_requests, :version_id, :integer
|
||||
# add_column :pull_requests, :body, :text
|
||||
# add_column :pull_requests, :from_ref, :string
|
||||
# add_column :pull_requests, :to_ref, :string
|
||||
end
|
||||
end
|
||||
14
db/migrate/20200108031646_change_pull_requests_columns.rb
Normal file
14
db/migrate/20200108031646_change_pull_requests_columns.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class ChangePullRequestsColumns < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# remove_column :pull_request_assigns, :user_id
|
||||
# add_column :pull_request_assigns, :user_login, :string
|
||||
#
|
||||
# add_index :pull_request_assigns, [:user_login]
|
||||
#
|
||||
# rename_column :pull_requests, :version_id, :milestone
|
||||
# rename_column :pull_requests, :from_ref, :head
|
||||
# rename_column :pull_requests, :to_ref, :base
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class AddColumnsToPullRequests < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :pull_requests, :issue_id, :integer
|
||||
# add_column :issues, :issue_classify, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class AddIssuesRefNameAndBranchName < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :issues, :ref_name, :string
|
||||
# add_column :issues, :branch_name, :string
|
||||
end
|
||||
end
|
||||
16
db/migrate/20200117032213_add_issue_priosity_to_table.rb
Normal file
16
db/migrate/20200117032213_add_issue_priosity_to_table.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
# encoding: UTF-8
|
||||
class AddIssuePriosityToTable < ActiveRecord::Migration[5.2]
|
||||
#本地需要修改,线上不用修改
|
||||
# def change
|
||||
# create_table :issue_priorities do |t|
|
||||
# t.string :name, charset: :utf8
|
||||
# t.integer :position
|
||||
# t.timestamps
|
||||
# end
|
||||
# name = %w(低 正常 高 紧急 立刻)
|
||||
# position = %w(1 2 3 4 5)
|
||||
# name.each_with_index do |n, index|
|
||||
# IssuePriority.create!(name:n.to_s, position: position[index])
|
||||
# end
|
||||
# end
|
||||
end
|
||||
7
db/migrate/20200210071320_migrate_defalut_to_tiding.rb
Normal file
7
db/migrate/20200210071320_migrate_defalut_to_tiding.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class MigrateDefalutToTiding < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
change_column_default :tidings, :status, from: nil, to: 0
|
||||
|
||||
Tiding.where(status: nil).update_all(status: 0)
|
||||
end
|
||||
end
|
||||
9
db/migrate/20200210074241_migrate_tiding_status.rb
Normal file
9
db/migrate/20200210074241_migrate_tiding_status.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class MigrateTidingStatus < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
Tiding.where(container_type: "JoinCourse", status: 0).each do |tiding|
|
||||
unless CourseMessage.where(course_message_id: tiding.trigger_user_id, course_id: tiding.container_id, course_message_type: "JoinCourseRequest", status: 0).exists?
|
||||
tiding.update!(status: 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
5
db/migrate/20200210111249_add_is_delete_to_tiding.rb
Normal file
5
db/migrate/20200210111249_add_is_delete_to_tiding.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class AddIsDeleteToTiding < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :tidings, :is_delete, :boolean, default: 0
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class UpdateTidingsDeleteStatus < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# Tiding.where.not(container_type: 'DeleteCourse').where(belong_container_type: "Course", belong_container_id: Course.where(is_delete: 1).pluck(:id)).update_all(is_delete: 1)
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,17 @@
|
||||
class AddValuesToIssueTagsAndTrackers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
issue_status = %w(新增 正在解决 已解决 反馈 关闭 拒绝)
|
||||
trackers = %w(缺陷 功能 支持 任务 周报)
|
||||
issue_status.each_with_index do |s, index|
|
||||
unless IssueStatus.exists?(name: s)
|
||||
IssueStatus.create!(name: s, is_closed: (index == 4) , is_default: (index == 0), position: index+1)
|
||||
end
|
||||
end
|
||||
|
||||
trackers.each_with_index do |s, index|
|
||||
unless Tracker.exists?(name: s)
|
||||
Tracker.create!(name: s, is_in_chlog: (index == 0 || index == 1) , is_in_roadmap: (index != 0 || index != 2), position: index+1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class AddIssuesCountAndPullRequestsCountToProjects < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :projects, :issues_count, :integer, :default => 0
|
||||
# add_column :projects, :pull_requests_count, :integer, :default => 0
|
||||
end
|
||||
end
|
||||
11
db/migrate/20200213094050_migrate_user_location.rb
Normal file
11
db/migrate/20200213094050_migrate_user_location.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class MigrateUserLocation < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
UserExtension.where("location like '%省'").each do |ue|
|
||||
ue.update_column("location", ue.location.chop)
|
||||
end
|
||||
|
||||
UserExtension.where("location_city like '%市'").each do |ue|
|
||||
ue.update_column("location_city", ue.location_city.chop)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,7 @@
|
||||
class AddIssuesCountToVersions < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
# add_column :versions, :issues_count, :integer, :default => 0
|
||||
# add_column :versions, :closed_issues_count, :integer, :default => 0
|
||||
# add_column :versions, :percent, :float, default: 0.0
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class ChangeVersionsDescriptions < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
change_column_default :versions, :description, nil
|
||||
change_column :versions, :description, :text
|
||||
end
|
||||
end
|
||||
31
db/seeds.rb
Normal file
31
db/seeds.rb
Normal file
@@ -0,0 +1,31 @@
|
||||
# This file should contain all the record creation needed to seed the database with its default values.
|
||||
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
|
||||
# Character.create(name: 'Luke', movie: movies.first)
|
||||
|
||||
# create_table :outputs do |t|
|
||||
# t.integer :code
|
||||
# t.integer :game_id
|
||||
# t.text :msg
|
||||
# t.longtext :out_put
|
||||
# t.integer :test_set_position
|
||||
# t.text :actual_output
|
||||
#
|
||||
# t.timestamps
|
||||
# end
|
||||
#
|
||||
|
||||
# video_p = {
|
||||
# user_id: 1,
|
||||
# title: "第一个测试的.mp4",
|
||||
# uuid: "748fa8165062433781ccd87f1f815403",
|
||||
# cover_url: "http://outin-396971199eed11e991a100163e1c7426.oss-cn-shanghai.aliyuncs.com/sv/30ec9167-16ca9111f7d/30ec9167-16ca9111f7d.mp4",
|
||||
# file_url: "http://outin-396971199eed11e991a100163e1c7426.oss-cn-shanghai.aliyuncs.com/sv/30ec9167-16ca9111f7d/30ec9167-16ca9111f7d.mp4",
|
||||
# status: "pending",
|
||||
# vod_status: "uploaded",
|
||||
# published_at: nil,
|
||||
# filesize: 14877403
|
||||
# }
|
||||
3428
db/structure.sql
Normal file
3428
db/structure.sql
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user