Permalink
Browse files

Set data null when placeholder attachment

refs #53

requires migration 005
  • Loading branch information...
1 parent c9a6e61 commit b1d7a4da7f128cac03005c5b4d0e7c3dfb27e08c Jesse Stuart committed Dec 15, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −0 db/migrations/005_drop_attachments_data_not_null_constrant.rb
  2. +0 −1 lib/tentd/api/posts.rb
View
7 db/migrations/005_drop_attachments_data_not_null_constrant.rb
@@ -0,0 +1,7 @@
+Sequel.migration do
+ change do
+ alter_table(:post_attachments) do
+ set_column_allow_null :data, true
+ end
+ end
+end
View
1 lib/tentd/api/posts.rb
@@ -354,7 +354,6 @@ def action(env)
:type => attachment.type,
:category => attachment.category.to_s,
:name => attachment.name,
- :data => '',
:size => attachment[:size]
)

0 comments on commit b1d7a4d

Please sign in to comment.