Skip to content

Commit

Permalink
Don't enforce NOT NULL constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
ndemengel committed Jul 23, 2018
1 parent 1286344 commit 101fe5a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mongo_connector/doc_managers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ def get_nested_field_from_document(document, dot_notation_key):


def pg_type_for_mapping_type(mapping_type):
return 'BOOLEAN NOT NULL DEFAULT FALSE' if mapping_type == FIELD_PRESENCE_TYPE else mapping_type
return 'BOOLEAN DEFAULT FALSE' if mapping_type == FIELD_PRESENCE_TYPE else mapping_type
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='mongo-connector-postgresql',
version='1.4.0',
version='1.4.1',
description='Doc Manager Postgresl for Mongo connector Distribution Utilities',
keywords=['mongo-connector', 'mongo', 'mongodb', 'postgresql'],
platforms=["any"],
Expand Down
2 changes: 1 addition & 1 deletion tests/test_postgresql_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def test_valid_configuration(self):
cursor.execute.assert_has_calls([
call('DROP TABLE col'),
call(
'CREATE TABLE col (_creationdate TIMESTAMP,_id INT CONSTRAINT COL_PK PRIMARY KEY,field1 TEXT ,field3_is_present BOOLEAN NOT NULL DEFAULT FALSE ) '
'CREATE TABLE col (_creationdate TIMESTAMP,_id INT CONSTRAINT COL_PK PRIMARY KEY,field1 TEXT ,field3_is_present BOOLEAN DEFAULT FALSE ) '
),
call(
'CREATE TABLE col_field2 (_creationdate TIMESTAMP,_id INT CONSTRAINT COL_FIELD2_PK PRIMARY KEY,id_col INT ,subfield1 TEXT ) '
Expand Down

0 comments on commit 101fe5a

Please sign in to comment.