Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Milan
diaspora
Commits
e08440d7
Unverified
Commit
e08440d7
authored
Aug 25, 2017
by
Benjamin Neff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge migrations from before 0.6.0.0 to 0000_create_schema.rb
closes #7580
parent
b040f857
Changes
62
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
62 changed files
with
308 additions
and
1233 deletions
+308
-1233
Changelog.md
Changelog.md
+1
-0
db/migrate/0000_create_schema.rb
db/migrate/0000_create_schema.rb
+307
-125
db/migrate/20130207231310_add_facebook_id_to_post.rb
db/migrate/20130207231310_add_facebook_id_to_post.rb
+0
-5
db/migrate/20130404211624_fix_default_image_url_from_profile.rb
...rate/20130404211624_fix_default_image_url_from_profile.rb
+0
-9
db/migrate/20130429073928_add_tweet_id_to_post.rb
db/migrate/20130429073928_add_tweet_id_to_post.rb
+0
-6
db/migrate/20130608171134_add_open_graph_cache.rb
db/migrate/20130608171134_add_open_graph_cache.rb
+0
-19
db/migrate/20130613203350_remove_limit_from_root_guid_in_posts.rb
...te/20130613203350_remove_limit_from_root_guid_in_posts.rb
+0
-13
db/migrate/20130717104359_migrate_activity_stream_to_status_message.rb
...130717104359_migrate_activity_stream_to_status_message.rb
+0
-13
db/migrate/20130801063213_add_tumblr_post_ids_to_posts.rb
db/migrate/20130801063213_add_tumblr_post_ids_to_posts.rb
+0
-5
db/migrate/20131017093025_create_post_reports.rb
db/migrate/20131017093025_create_post_reports.rb
+0
-13
db/migrate/20131213171804_create_simple_captcha_data.rb
db/migrate/20131213171804_create_simple_captcha_data.rb
+0
-15
db/migrate/20140121132816_add_post_type_to_post_report.rb
db/migrate/20140121132816_add_post_type_to_post_report.rb
+0
-6
db/migrate/20140214104217_rename_post_report_to_report.rb
db/migrate/20140214104217_rename_post_report_to_report.rb
+0
-8
db/migrate/20140222162826_devise_add_lastseenable_user.rb
db/migrate/20140222162826_devise_add_lastseenable_user.rb
+0
-12
db/migrate/20140308154022_create_polls.rb
db/migrate/20140308154022_create_polls.rb
+0
-38
db/migrate/20140422134050_rename_post_columns_to_item.rb
db/migrate/20140422134050_rename_post_columns_to_item.rb
+0
-11
db/migrate/20140422134627_change_user_id_type_to_integer.rb
db/migrate/20140422134627_change_user_id_type_to_integer.rb
+0
-12
db/migrate/20140601102543_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb
...gings_counter_cache_to_tags.acts_as_taggable_on_engine.rb
+0
-15
db/migrate/20140801101230_create_chat_contacts.rb
db/migrate/20140801101230_create_chat_contacts.rb
+0
-17
db/migrate/20140801101352_create_chat_fragments.rb
db/migrate/20140801101352_create_chat_fragments.rb
+0
-17
db/migrate/20140824230505_add_completed_at_to_account_deletions.rb
...e/20140824230505_add_completed_at_to_account_deletions.rb
+0
-5
db/migrate/20140826165533_increase_simple_captcha_limit.rb
db/migrate/20140826165533_increase_simple_captcha_limit.rb
+0
-8
db/migrate/20140906192846_fix_open_graph_data.rb
db/migrate/20140906192846_fix_open_graph_data.rb
+0
-10
db/migrate/20141001162851_add_remove_after_to_users.rb
db/migrate/20141001162851_add_remove_after_to_users.rb
+0
-5
db/migrate/20141007003922_add_chat_enabled_to_aspects.rb
db/migrate/20141007003922_add_chat_enabled_to_aspects.rb
+0
-9
db/migrate/20141024170120_create_chat_offline_messages.rb
db/migrate/20141024170120_create_chat_offline_messages.rb
+0
-14
db/migrate/20141209041241_drop_open_graph_caches_with_invalid_urls.rb
...0141209041241_drop_open_graph_caches_with_invalid_urls.rb
+0
-9
db/migrate/20141216213423_purge_orphan_conversations.rb
db/migrate/20141216213423_purge_orphan_conversations.rb
+0
-13
db/migrate/20141227120907_add_export_to_user.rb
db/migrate/20141227120907_add_export_to_user.rb
+0
-7
db/migrate/20141230214830_user_pref_strip_exif.rb
db/migrate/20141230214830_user_pref_strip_exif.rb
+0
-9
db/migrate/20150209230946_disable_mail_for_closed_account.rb
db/migrate/20150209230946_disable_mail_for_closed_account.rb
+0
-9
db/migrate/20150220001357_add_photos_export_to_user.rb
db/migrate/20150220001357_add_photos_export_to_user.rb
+0
-13
db/migrate/20150403192408_remove_deleted_aspects_from_auto_follow_back.rb
...403192408_remove_deleted_aspects_from_auto_follow_back.rb
+0
-11
db/migrate/20150403212139_fix_wrong_only_sharing.rb
db/migrate/20150403212139_fix_wrong_only_sharing.rb
+0
-11
db/migrate/20150523004437_enable_color_themes.rb
db/migrate/20150523004437_enable_color_themes.rb
+0
-9
db/migrate/20150531005120_cleanup_default_avatars.rb
db/migrate/20150531005120_cleanup_default_avatars.rb
+0
-10
db/migrate/20150607143809_fix_photo_public_flag.rb
db/migrate/20150607143809_fix_photo_public_flag.rb
+0
-9
db/migrate/20150613202109_create_o_auth_applications.rb
db/migrate/20150613202109_create_o_auth_applications.rb
+0
-30
db/migrate/20150630221004_add_public_to_profiles.rb
db/migrate/20150630221004_add_public_to_profiles.rb
+0
-5
db/migrate/20150708153926_create_authorizations.rb
db/migrate/20150708153926_create_authorizations.rb
+0
-18
db/migrate/20150708153928_create_o_auth_access_tokens.rb
db/migrate/20150708153928_create_o_auth_access_tokens.rb
+0
-14
db/migrate/20150714055110_create_id_tokens.rb
db/migrate/20150714055110_create_id_tokens.rb
+0
-14
db/migrate/20150724152052_remove_favorites_from_posts.rb
db/migrate/20150724152052_remove_favorites_from_posts.rb
+0
-9
db/migrate/20150731123113_create_pairwise_pseudonymous_identifiers.rb
...0150731123113_create_pairwise_pseudonymous_identifiers.rb
+0
-15
db/migrate/20150731123114_add_status_to_pods.rb
db/migrate/20150731123114_add_status_to_pods.rb
+0
-14
db/migrate/20150828132451_remove_duplicate_and_empty_pods.rb
db/migrate/20150828132451_remove_duplicate_and_empty_pods.rb
+0
-24
db/migrate/20151003142048_update_report_item_types.rb
db/migrate/20151003142048_update_report_item_types.rb
+0
-7
db/migrate/20151210213023_remove_signatures_from_relayables.rb
...grate/20151210213023_remove_signatures_from_relayables.rb
+0
-9
db/migrate/20160124234712_extend_pods.rb
db/migrate/20160124234712_extend_pods.rb
+0
-77
db/migrate/20160225232049_link_share_visibilities_with_user.rb
...grate/20160225232049_link_share_visibilities_with_user.rb
+0
-80
db/migrate/20160302025129_cleanup_aspect_visibility.rb
db/migrate/20160302025129_cleanup_aspect_visibility.rb
+0
-27
db/migrate/20160307142216_cleanup_handles.rb
db/migrate/20160307142216_cleanup_handles.rb
+0
-7
db/migrate/20160327103605_add_author_id_index_to_participations.rb
...e/20160327103605_add_author_id_index_to_participations.rb
+0
-5
db/migrate/20160509232726_cleanup_duplicates_and_add_unique_indexes.rb
...160509232726_cleanup_duplicates_and_add_unique_indexes.rb
+0
-47
db/migrate/20160531170531_remove_duplicate_aspect_visibilities.rb
...te/20160531170531_remove_duplicate_aspect_visibilities.rb
+0
-11
db/migrate/20160618033455_cleanup_participations.rb
db/migrate/20160618033455_cleanup_participations.rb
+0
-44
db/migrate/20160720212620_create_signature_tables.rb
db/migrate/20160720212620_create_signature_tables.rb
+0
-87
db/migrate/20160802212635_cleanup_posts_table.rb
db/migrate/20160802212635_cleanup_posts_table.rb
+0
-30
db/migrate/20160807212443_participation_counter.rb
db/migrate/20160807212443_participation_counter.rb
+0
-47
db/migrate/20160810230114_cleanup_invitation_columns_from_users.rb
...e/20160810230114_cleanup_invitation_columns_from_users.rb
+0
-72
db/migrate/20160813115514_remove_id_tokens.rb
db/migrate/20160813115514_remove_id_tokens.rb
+0
-7
db/migrate/20160822212739_remove_started_sharing_notifications_without_contact.rb
...9_remove_started_sharing_notifications_without_contact.rb
+0
-13
No files found.
Changelog.md
View file @
e08440d7
...
...
@@ -6,6 +6,7 @@
*
Sort notifications by last interaction
[
#7568
](
https://github.com/diaspora/diaspora/pull/7568
)
*
Remove tiff support from photos
[
#7576
](
https://github.com/diaspora/diaspora/pull/7576
)
*
Remove reference from reshares when original post is deleted
[
#7578
](
https://github.com/diaspora/diaspora/pull/7578
)
*
Merge migrations from before 0.6.0.0 to CreateSchema
[
#7580
](
https://github.com/diaspora/diaspora/pull/7580
)
## Bug fixes
*
Fix displaying polls with long answers
[
#7579
](
https://github.com/diaspora/diaspora/pull/7579
)
...
...
db/migrate/0000_create_schema.rb
View file @
e08440d7
This diff is collapsed.
Click to expand it.
db/migrate/20130207231310_add_facebook_id_to_post.rb
deleted
100644 → 0
View file @
b040f857
class
AddFacebookIdToPost
<
ActiveRecord
::
Migration
[
4.2
]
def
change
add_column
:posts
,
:facebook_id
,
:string
end
end
db/migrate/20130404211624_fix_default_image_url_from_profile.rb
deleted
100644 → 0
View file @
b040f857
class
FixDefaultImageUrlFromProfile
<
ActiveRecord
::
Migration
[
4.2
]
def
up
execute
(
"UPDATE profiles SET image_url = REPLACE(image_url, 'images', 'assets'), image_url_small = REPLACE(image_url_small, 'images', 'assets'), image_url_medium = REPLACE(image_url_medium, 'images', 'assets') WHERE image_url LIKE '%images/user/default.png';"
)
end
def
down
execute
(
"UPDATE profiles SET image_url = REPLACE(image_url, 'assets', 'images'), image_url_small = REPLACE(image_url_small, 'assets', 'images'), image_url_medium = REPLACE(image_url_medium, 'assets', 'images') WHERE image_url LIKE '%assets/user/default.png';"
)
end
end
db/migrate/20130429073928_add_tweet_id_to_post.rb
deleted
100644 → 0
View file @
b040f857
class
AddTweetIdToPost
<
ActiveRecord
::
Migration
[
4.2
]
def
change
add_column
:posts
,
:tweet_id
,
:string
add_index
:posts
,
[
'tweet_id'
],
:length
=>
{
"tweet_id"
=>
191
}
end
end
db/migrate/20130608171134_add_open_graph_cache.rb
deleted
100644 → 0
View file @
b040f857
class
AddOpenGraphCache
<
ActiveRecord
::
Migration
[
4.2
]
def
up
create_table
:open_graph_caches
do
|
t
|
t
.
string
:title
t
.
string
:ob_type
t
.
string
:image
t
.
string
:url
t
.
text
:description
end
change_table
:posts
do
|
t
|
t
.
integer
:open_graph_cache_id
end
end
def
down
remove_column
:posts
,
:open_graph_cache_id
drop_table
:open_graph_caches
end
end
db/migrate/20130613203350_remove_limit_from_root_guid_in_posts.rb
deleted
100644 → 0
View file @
b040f857
class
RemoveLimitFromRootGuidInPosts
<
ActiveRecord
::
Migration
[
4.2
]
def
up
remove_index
'posts'
,
:name
=>
'index_posts_on_root_guid'
remove_index
'posts'
,
:name
=>
'index_posts_on_author_id_and_root_guid'
change_column
:posts
,
:root_guid
,
:string
add_index
'posts'
,
[
"root_guid"
],
:name
=>
'index_posts_on_root_guid'
,
length:
{
"root_guid"
=>
191
}
add_index
'posts'
,
[
"author_id"
,
"root_guid"
],
:name
=>
'index_posts_on_author_id_and_root_guid'
,
length:
{
"root_guid"
=>
190
},
:using
=>
:btree
,
:unique
=>
true
end
def
down
change_column
:posts
,
:root_guid
,
:string
,
limit:
30
end
end
db/migrate/20130717104359_migrate_activity_stream_to_status_message.rb
deleted
100644 → 0
View file @
b040f857
class
MigrateActivityStreamToStatusMessage
<
ActiveRecord
::
Migration
[
4.2
]
class
Post
<
ApplicationRecord
;
self
.
inheritance_column
=
false
;
end
def
up
posts_stream_photos
=
Post
.
where
(
type:
'ActivityStreams::Photo'
)
posts_stream_photos
.
each
do
|
p
|
p
.
update_attributes
({
text:
"
#{
p
.
text
}
"
,
type:
"StatusMessage"
},
without_protection:
true
)
end
end
def
down
raise
ActiveRecord
::
IrreversibleMigration
,
"Can't recover the deleted ActivityStreams::Photo"
end
end
db/migrate/20130801063213_add_tumblr_post_ids_to_posts.rb
deleted
100644 → 0
View file @
b040f857
class
AddTumblrPostIdsToPosts
<
ActiveRecord
::
Migration
[
4.2
]
def
change
add_column
:posts
,
:tumblr_ids
,
:text
end
end
db/migrate/20131017093025_create_post_reports.rb
deleted
100644 → 0
View file @
b040f857
class
CreatePostReports
<
ActiveRecord
::
Migration
[
4.2
]
def
change
create_table
:post_reports
do
|
t
|
t
.
integer
:post_id
,
:null
=>
false
t
.
string
:user_id
t
.
boolean
:reviewed
,
:default
=>
false
t
.
text
:text
t
.
timestamps
end
add_index
:post_reports
,
:post_id
end
end
db/migrate/20131213171804_create_simple_captcha_data.rb
deleted
100644 → 0
View file @
b040f857
class
CreateSimpleCaptchaData
<
ActiveRecord
::
Migration
[
4.2
]
def
self
.
up
create_table
:simple_captcha_data
do
|
t
|
t
.
string
:key
,
:limit
=>
40
t
.
string
:value
,
:limit
=>
6
t
.
timestamps
end
add_index
:simple_captcha_data
,
:key
,
:name
=>
"idx_key"
end
def
self
.
down
drop_table
:simple_captcha_data
end
end
db/migrate/20140121132816_add_post_type_to_post_report.rb
deleted
100644 → 0
View file @
b040f857
class
AddPostTypeToPostReport
<
ActiveRecord
::
Migration
[
4.2
]
def
change
add_column
:post_reports
,
:post_type
,
:string
,
:null
=>
false
,
:after
=>
:post_id
,
:default
=>
'post'
change_column_default
:post_reports
,
:post_type
,
nil
end
end
db/migrate/20140214104217_rename_post_report_to_report.rb
deleted
100644 → 0
View file @
b040f857
class
RenamePostReportToReport
<
ActiveRecord
::
Migration
[
4.2
]
def
self
.
up
rename_table
:post_reports
,
:reports
end
def
self
.
down
rename_table
:reports
,
:post_reports
end
end
db/migrate/20140222162826_devise_add_lastseenable_user.rb
deleted
100644 → 0
View file @
b040f857
class
DeviseAddLastseenableUser
<
ActiveRecord
::
Migration
[
4.2
]
def
self
.
up
add_column
:users
,
:last_seen
,
:datetime
User
.
find_each
do
|
user
|
user
.
update_column
(
:last_seen
,
user
.
last_sign_in_at
)
end
end
def
self
.
down
remove_column
:users
,
:last_seen
end
end
\ No newline at end of file
db/migrate/20140308154022_create_polls.rb
deleted
100644 → 0
View file @
b040f857
class
CreatePolls
<
ActiveRecord
::
Migration
[
4.2
]
def
up
create_table
:polls
do
|
t
|
t
.
string
:question
,
:null
=>
false
t
.
belongs_to
:status_message
,
:null
=>
false
t
.
boolean
:status
t
.
string
:guid
t
.
timestamps
end
add_index
:polls
,
:status_message_id
create_table
:poll_answers
do
|
t
|
t
.
string
:answer
,
:null
=>
false
t
.
belongs_to
:poll
,
:null
=>
false
t
.
string
:guid
t
.
integer
:vote_count
,
:default
=>
0
end
add_index
:poll_answers
,
:poll_id
create_table
:poll_participations
do
|
t
|
t
.
belongs_to
:poll_answer
,
:null
=>
false
t
.
belongs_to
:author
,
:null
=>
false
t
.
belongs_to
:poll
,
:null
=>
false
t
.
string
:guid
t
.
text
:author_signature
t
.
text
:parent_author_signature
t
.
timestamps
end
add_index
:poll_participations
,
:poll_id
end
def
down
drop_table
:polls
drop_table
:poll_answers
drop_table
:poll_participations
end
end
db/migrate/20140422134050_rename_post_columns_to_item.rb
deleted
100644 → 0
View file @
b040f857
class
RenamePostColumnsToItem
<
ActiveRecord
::
Migration
[
4.2
]
def
up
rename_column
:reports
,
:post_id
,
:item_id
rename_column
:reports
,
:post_type
,
:item_type
end
def
down
rename_column
:reports
,
:item_id
,
:post_id
rename_column
:reports
,
:item_type
,
:post_type
end
end
db/migrate/20140422134627_change_user_id_type_to_integer.rb
deleted
100644 → 0
View file @
b040f857
class
ChangeUserIdTypeToInteger
<
ActiveRecord
::
Migration
[
4.2
]
def
up
remove_column
:reports
,
:user_id
add_column
:reports
,
:user_id
,
:integer
,
:null
=>
false
,
:default
=>
1
change_column_default
:reports
,
:user_id
,
nil
end
def
down
remove_column
:reports
,
:user_id
add_column
:reports
,
:user_id
,
:string
end
end
db/migrate/20140601102543_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb
deleted
100644 → 0
View file @
b040f857
# This migration comes from acts_as_taggable_on_engine (originally 3)
class
AddTaggingsCounterCacheToTags
<
ActiveRecord
::
Migration
[
4.2
]
def
self
.
up
add_column
:tags
,
:taggings_count
,
:integer
,
default:
0
ActsAsTaggableOn
::
Tag
.
reset_column_information
ActsAsTaggableOn
::
Tag
.
find_each
do
|
tag
|
ActsAsTaggableOn
::
Tag
.
reset_counters
(
tag
.
id
,
:taggings
)
end
end
def
self
.
down
remove_column
:tags
,
:taggings_count
end
end
db/migrate/20140801101230_create_chat_contacts.rb
deleted
100644 → 0
View file @
b040f857
class
CreateChatContacts
<
ActiveRecord
::
Migration
[
4.2
]
def
up
create_table
:chat_contacts
do
|
t
|
t
.
integer
:user_id
,
null:
false
## JID <= 3071 bytes http://tools.ietf.org/html/rfc6122
t
.
string
:jid
,
null:
false
t
.
string
:name
,
limit:
255
,
null:
true
t
.
string
:ask
,
limit:
128
,
null:
true
t
.
string
:subscription
,
limit:
128
,
null:
false
end
add_index
:chat_contacts
,
[
:user_id
,
:jid
],
unique:
true
,
:length
=>
{
:jid
=>
190
}
end
def
down
drop_table
:chat_contacts
end
end
db/migrate/20140801101352_create_chat_fragments.rb
deleted
100644 → 0
View file @
b040f857
class
CreateChatFragments
<
ActiveRecord
::
Migration
[
4.2
]
def
up
create_table
:chat_fragments
do
|
t
|
t
.
integer
:user_id
,
null:
false
t
.
string
:root
,
limit:
256
,
null:
false
t
.
string
:namespace
,
limit:
256
,
null:
false
t
.
text
:xml
,
null:
false
end
# That won't work due UTF-8 and the limit of 767 bytes
#add_index :chat_fragments, [:user_id, :root, :namespace], unique: true
add_index
:chat_fragments
,
[
:user_id
],
unique:
true
end
def
down
drop_table
:chat_fragments
end
end
db/migrate/20140824230505_add_completed_at_to_account_deletions.rb
deleted
100644 → 0
View file @
b040f857
class
AddCompletedAtToAccountDeletions
<
ActiveRecord
::
Migration
[
4.2
]
def
change
add_column
:account_deletions
,
:completed_at
,
:datetime
end
end
db/migrate/20140826165533_increase_simple_captcha_limit.rb
deleted
100644 → 0
View file @
b040f857
class
IncreaseSimpleCaptchaLimit
<
ActiveRecord
::
Migration
[
4.2
]
def
self
.
up
change_column
:simple_captcha_data
,
:value
,
:string
,
:limit
=>
12
end
def
self
.
down
change_column
:simple_captcha_data
,
:value
,
:string
,
:limit
=>
6
end
end
db/migrate/20140906192846_fix_open_graph_data.rb
deleted
100644 → 0
View file @
b040f857
class
FixOpenGraphData
<
ActiveRecord
::
Migration
[
4.2
]
def
self
.
up
change_column
:open_graph_caches
,
:url
,
:text
change_column
:open_graph_caches
,
:image
,
:text
end
def
self
.
down
change_column
:open_graph_caches
,
:url
,
:string
change_column
:open_graph_caches
,
:image
,
:string
end
end
db/migrate/20141001162851_add_remove_after_to_users.rb
deleted
100644 → 0
View file @
b040f857
class
AddRemoveAfterToUsers
<
ActiveRecord
::
Migration
[
4.2
]
def
change
add_column
:users
,
:remove_after
,
:datetime
end
end
db/migrate/20141007003922_add_chat_enabled_to_aspects.rb
deleted
100644 → 0
View file @
b040f857
class
AddChatEnabledToAspects
<
ActiveRecord
::
Migration
[
4.2
]
def
self
.
up
add_column
:aspects
,
:chat_enabled
,
:boolean
,
default:
false
end
def
self
.
down
remove_column
:aspects
,
:chat_enabled
end
end
db/migrate/20141024170120_create_chat_offline_messages.rb
deleted
100644 → 0
View file @
b040f857
class
CreateChatOfflineMessages
<
ActiveRecord
::
Migration
[
4.2
]
def
self
.
up
create_table
:chat_offline_messages
do
|
t
|
t
.
string
:from
,
:null
=>
false
t
.
string
:to
,
:null
=>
false
t
.
text
:message
,
:null
=>
false
t
.
datetime
"created_at"
,
:null
=>
false
end
end
def
self
.
down
drop_table
:chat_offline_messages
end
end
db/migrate/20141209041241_drop_open_graph_caches_with_invalid_urls.rb
deleted
100644 → 0
View file @
b040f857
class
DropOpenGraphCachesWithInvalidUrls
<
ActiveRecord
::
Migration
[
4.2
]
def
up
OpenGraphCache
.
where
(
url:
'http://'
).
delete_all
end
def
down
raise
ActiveRecord
::
IrreversibleMigration
end
end
db/migrate/20141216213423_purge_orphan_conversations.rb
deleted
100644 → 0
View file @
b040f857
class
PurgeOrphanConversations
<
ActiveRecord
::
Migration
[
4.2
]
def
up
Conversation
.
where
(
id:
Conversation
.
joins
(
"LEFT JOIN conversation_visibilities ON conversation_visibilities.conversation_id = conversations.id"
)
.
group
(
'conversations.id'
)
.
having
(
"COUNT(conversation_visibilities.id) = 0"
)
.
pluck
(
'conversations.id'
)
).
delete_all
end
def
down
raise
ActiveRecord
::
IrreversibleMigration
end
end
db/migrate/20141227120907_add_export_to_user.rb
deleted
100644 → 0
View file @
b040f857
class
AddExportToUser
<
ActiveRecord
::
Migration
[
4.2
]
def
change
add_column
:users
,
:export
,
:string
add_column
:users
,
:exported_at
,
:datetime
add_column
:users
,
:exporting
,
:boolean
,
default:
false
end
end
db/migrate/20141230214830_user_pref_strip_exif.rb
deleted
100644 → 0
View file @
b040f857
class
UserPrefStripExif
<
ActiveRecord
::
Migration
[
4.2
]
def
up
add_column
:users
,
:strip_exif
,
:boolean
,
default:
true
end
def
down
remove_column
:users
,
:strip_exif
end
end
db/migrate/20150209230946_disable_mail_for_closed_account.rb
deleted
100644 → 0
View file @
b040f857
class
DisableMailForClosedAccount
<
ActiveRecord
::
Migration
[
4.2
]
def
up
User
.
joins
(
:person
).
where
(
people:
{
closed_account:
true
}).
update_all
(
disable_mail:
true
)
end
def
down
User
.
joins
(
:person
).
where
(
people:
{
closed_account:
true
}).
update_all
(
disable_mail:
false
)
end
end
db/migrate/20150220001357_add_photos_export_to_user.rb
deleted
100644 → 0
View file @
b040f857
class
AddPhotosExportToUser
<
ActiveRecord
::
Migration
[
4.2
]
def
up
add_column
:users
,
:exported_photos_file
,
:string
add_column
:users
,
:exported_photos_at
,
:datetime
add_column
:users
,
:exporting_photos
,
:boolean
,
default:
false
end
def
down
remove_column
:users
,
:exported_photos_file
remove_column
:users
,
:exported_photos_at
remove_column
:users
,
:exporting_photos
end
end
db/migrate/20150403192408_remove_deleted_aspects_from_auto_follow_back.rb
deleted
100644 → 0
View file @
b040f857
class
RemoveDeletedAspectsFromAutoFollowBack
<
ActiveRecord
::
Migration
[
4.2
]
def
up
User
.
where
.
not
(
auto_follow_back_aspect_id:
Aspect
.
select
(
:id
))
.
where
(
auto_follow_back:
true
)
.
update_all
(
auto_follow_back:
false
,
auto_follow_back_aspect_id:
nil
)
end
def
down
raise
ActiveRecord
::
IrreversibleMigration
end
end
db/migrate/20150403212139_fix_wrong_only_sharing.rb
deleted
100644 → 0
View file @
b040f857
class
FixWrongOnlySharing
<
ActiveRecord
::
Migration
[
4.2
]
def
up
Contact
.
where
(
sharing:
true
,
receiving:
false
)
.
where
(
id:
AspectMembership
.
select
(
:contact_id
))
.
update_all
(
receiving:
true
)
end
def
down
raise
ActiveRecord
::
IrreversibleMigration
end
end
db/migrate/20150523004437_enable_color_themes.rb
deleted
100644 → 0
View file @
b040f857
class
EnableColorThemes
<
ActiveRecord
::
Migration
[
4.2
]
def
up
add_column
(
:users
,
:color_theme
,
:string
)
end
def
down
remove_column
(
:users
,
:color_theme
)
end
end
db/migrate/20150531005120_cleanup_default_avatars.rb
deleted
100644 → 0
View file @
b040f857
class
CleanupDefaultAvatars
<
ActiveRecord
::
Migration
[
4.2
]
def
up
Profile
.
where
(
"image_url LIKE ?"
,
"%user/default%"
)
.
update_all
(
image_url:
nil
,
image_url_small:
nil
,
image_url_medium:
nil
)
end
def
down
raise
ActiveRecord
::
IrreversibleMigration
end
end
db/migrate/20150607143809_fix_photo_public_flag.rb
deleted
100644 → 0
View file @
b040f857
class
FixPhotoPublicFlag
<
ActiveRecord
::
Migration
[
4.2
]
def
up
Photo
.
joins
(
:status_message
).
where
(
posts:
{
public:
true
}).
update_all
(
public:
true
)
end
def
down
raise
ActiveRecord
::
IrreversibleMigration
end
end
db/migrate/20150613202109_create_o_auth_applications.rb
deleted
100644 → 0
View file @
b040f857
# Inspired by https://github.com/nov/openid_connect_sample/blob/master/db/migrate/20110829023826_create_clients.rb
class
CreateOAuthApplications
<
ActiveRecord
::
Migration
[
4.2
]
def
change
create_table
:o_auth_applications
do
|
t
|
t
.
belongs_to
:user
,
index:
true
t
.
string
:client_id
,
index:
{
unique:
true
,
length:
191
}
t
.
string
:client_secret
t
.
string
:client_name
t
.
text
:redirect_uris
t
.
string
:response_types
t
.
string
:grant_types
t
.
string
:application_type
,
default:
"web"
t
.
string
:contacts
t
.
string
:logo_uri
t
.
string
:client_uri
t
.
string
:policy_uri
t
.
string
:tos_uri
t
.
string
:sector_identifier_uri
t
.
string
:token_endpoint_auth_method
t
.
text
:jwks
t
.
string
:jwks_uri
t
.
boolean
:ppid
,
default:
false
t
.
timestamps
null:
false
end
add_foreign_key
:o_auth_applications
,
:users
end
end
db/migrate/20150630221004_add_public_to_profiles.rb
deleted
100644 → 0
View file @
b040f857
class
AddPublicToProfiles
<
ActiveRecord
::
Migration
[
4.2
]
def
change
add_column
:profiles
,
:public_details
,
:boolean
,
default:
false
end
end
db/migrate/20150708153926_create_authorizations.rb
deleted
100644 → 0
View file @
b040f857
class
CreateAuthorizations
<
ActiveRecord
::
Migration
[
4.2
]
def
change
create_table
:authorizations
do
|
t
|
t
.
belongs_to
:user
,
index:
true
t
.
belongs_to
:o_auth_application
,
index:
true
t
.
string
:refresh_token
t
.
string
:code
t
.
string
:redirect_uri
t
.
string
:nonce
t
.
string
:scopes
t
.
boolean
:code_used
,
default:
false
t
.
timestamps
null:
false
end
add_foreign_key
:authorizations
,
:users
add_foreign_key
:authorizations
,
:o_auth_applications
end
end
db/migrate/20150708153928_create_o_auth_access_tokens.rb
deleted
100644 → 0
View file @
b040f857
# Inspired by https://github.com/nov/openid_connect_sample/blob/master/db/migrate/20110829023837_create_access_tokens.rb
class
CreateOAuthAccessTokens
<
ActiveRecord
::
Migration
[
4.2
]
def
change
create_table
:o_auth_access_tokens
do
|
t
|
t
.
belongs_to
:authorization
,
index:
true
t
.
string
:token
,
index:
{
unique:
true
,
length:
191
}
t
.
datetime
:expires_at
t
.
timestamps
null:
false
end
add_foreign_key
:o_auth_access_tokens
,
:authorizations
end
end
db/migrate/20150714055110_create_id_tokens.rb
deleted
100644 → 0
View file @
b040f857
# Inspired by https://github.com/nov/openid_connect_sample/blob/master/db/migrate/20110829024010_create_id_tokens.rb
class
CreateIdTokens
<
ActiveRecord
::
Migration
[
4.2
]
def
change
create_table
:id_tokens
do
|
t
|
t
.
belongs_to
:authorization
,
index:
true
t
.
datetime
:expires_at
t
.
string
:nonce
t
.
timestamps
null:
false
end
add_foreign_key
:id_tokens
,
:authorizations
end
end
db/migrate/20150724152052_remove_favorites_from_posts.rb
deleted
100644 → 0
View file @
b040f857
class
RemoveFavoritesFromPosts
<
ActiveRecord
::
Migration
[
4.2
]
def
self
.
up
remove_column
:posts
,
:favorite
end
def
self
.
down
add_column
:posts
,
:favorite
,
:boolean
,
default:
false
end
end
db/migrate/20150731123113_create_pairwise_pseudonymous_identifiers.rb
deleted
100644 → 0
View file @
b040f857
# Inspired by https://github.com/nov/openid_connect_sample/blob/master/db/migrate/20110829024140_create_pairwise_pseudonymous_identifiers.rb
class
CreatePairwisePseudonymousIdentifiers
<
ActiveRecord
::
Migration
[
4.2
]
def
change
create_table
:ppid
do
|
t
|
t
.
belongs_to
:o_auth_application
,
index:
true