Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Set data null when placeholder attachment

refs #53

requires migration 005
  • Loading branch information...
commit b1d7a4da7f128cac03005c5b4d0e7c3dfb27e08c 1 parent c9a6e61
@jvatic jvatic authored
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]
)
Please sign in to comment.
Something went wrong with that request. Please try again.