Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
dbcf7dc7
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dbcf7dc7
编写于
8月 14, 2017
作者:
M
Matthew Draper
提交者:
GitHub
8月 14, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #30243 from kamipo/fix_ci_failure_due_to_reference_type_mismatch
Fix CI failure due to reference type mismatch
上级
691af789
a516dfd4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
18 addition
and
12 deletion
+18
-12
activerecord/test/cases/base_test.rb
activerecord/test/cases/base_test.rb
+9
-2
activerecord/test/schema/schema.rb
activerecord/test/schema/schema.rb
+9
-10
未找到文件。
activerecord/test/cases/base_test.rb
浏览文件 @
dbcf7dc7
...
...
@@ -885,10 +885,17 @@ def test_dup_of_saved_object_marks_as_dirty_only_changed_attributes
def
test_bignum
company
=
Company
.
find
(
1
)
company
.
rating
=
214748364
7
company
.
rating
=
214748364
8
company
.
save
company
=
Company
.
find
(
1
)
assert_equal
2147483647
,
company
.
rating
assert_equal
2147483648
,
company
.
rating
end
unless
current_adapter?
(
:SQLite3Adapter
)
def
test_bignum_pk
company
=
Company
.
create!
(
id:
2147483648
,
name:
"foo"
)
assert_equal
company
,
Company
.
find
(
company
.
id
)
end
end
# TODO: extend defaults tests to other databases!
...
...
activerecord/test/schema/schema.rb
浏览文件 @
dbcf7dc7
...
...
@@ -9,7 +9,7 @@
# ------------------------------------------------------------------- #
create_table
:accounts
,
force:
true
do
|
t
|
t
.
integer
:firm_id
t
.
references
:firm
,
index:
false
t
.
string
:firm_name
t
.
integer
:credit_limit
end
...
...
@@ -197,11 +197,11 @@
create_table
:companies
,
force:
true
do
|
t
|
t
.
string
:type
t
.
integer
:firm_id
t
.
references
:firm
,
index:
false
t
.
string
:firm_name
t
.
string
:name
t
.
integer
:client_of
t
.
integer
:rating
,
default:
1
t
.
bigint
:client_of
t
.
bigint
:rating
,
default:
1
t
.
integer
:account_id
t
.
string
:description
,
default:
""
t
.
index
[
:firm_id
,
:type
,
:rating
],
name:
"company_index"
,
length:
{
type:
10
},
order:
{
rating: :desc
}
...
...
@@ -236,8 +236,8 @@
end
create_table
:contracts
,
force:
true
do
|
t
|
t
.
integer
:developer_id
t
.
integer
:company_id
t
.
references
:developer
,
index:
false
t
.
references
:company
,
index:
false
end
create_table
:customers
,
force:
true
do
|
t
|
...
...
@@ -263,7 +263,7 @@
t
.
string
:name
t
.
string
:first_name
t
.
integer
:salary
,
default:
70000
t
.
integer
:firm_id
t
.
references
:firm
,
index:
false
t
.
integer
:mentor_id
if
subsecond_precision_supported?
t
.
datetime
:created_at
,
precision:
6
...
...
@@ -720,7 +720,7 @@
create_table
:projects
,
force:
true
do
|
t
|
t
.
string
:name
t
.
string
:type
t
.
integer
:firm_id
t
.
references
:firm
,
index:
false
t
.
integer
:mentor_id
end
...
...
@@ -809,8 +809,7 @@
create_table
:sponsors
,
force:
true
do
|
t
|
t
.
integer
:club_id
t
.
integer
:sponsorable_id
t
.
string
:sponsorable_type
t
.
references
:sponsorable
,
polymorphic:
true
,
index:
false
end
create_table
:string_key_objects
,
id:
false
,
force:
true
do
|
t
|
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录