Skip to content

Commit

Permalink
fix dictionary table generation, remove SERIES
Browse files Browse the repository at this point in the history
  • Loading branch information
rpiazza committed Mar 18, 2024
1 parent 37658df commit 4a12d7d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions stix2/datastore/relational_db/table_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from sqlalchemy import (
ARRAY,
SERIES,
TIMESTAMP,
Boolean,
CheckConstraint,
Expand Down Expand Up @@ -266,7 +265,7 @@ def generate_table_information(self, name, is_sdo, table_name):
columns.append(Column("value",
Text,
nullable=False))
return Table(canonicalize_table_name(name), metadata, *columns)
return Table(canonicalize_table_name(table_name + "_" + name), metadata, *columns)

@add_method(HashesProperty)
def generate_table_information(self, name, is_sdo, table_name):
Expand Down Expand Up @@ -388,7 +387,7 @@ def generate_object_table(stix_object_class, foreign_key_name=None, is_extension
if col is not None and isinstance(col, Table):
tables.append(col)
if is_extension:
columns.append(Column("id", SERIES, primary_key=True))
columns.append(Column("id", primary_key=True))
if foreign_key_name:
columns.append(Column("id",
Text,
Expand Down

0 comments on commit 4a12d7d

Please sign in to comment.