Skip to content

Conversation

@jrschumacher
Copy link
Member

Closes #76

return sq.StatementBuilder.PlaceholderFormat(sq.Dollar)
}

func tableName(table string) string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can probably get rid of these two package-level functions and rely on Table.Name and Table.Field if we want to keep those interfaces and the dynamic schema

mapping := &subjectmapping.SubjectMappingCreateUpdate{
AttributeValueId: attrValue.Id,
Operator: subjectmapping.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_IN,
SubjectAttribute: "subject_attribute--test",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason we don't want these other string values to come from fixtures as well?

##
# Attribute Values
##
attribute_values:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should every attribute definition have at least one value?

# Namespaces
##
namespaces:
metadata:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe schema here?

applied int
)

// create the schema
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the schema is now dynamic, does that make migrations down the road easier or harder? It seems like we could run into an edge case where we have made migration-worthy changes, a User sets config.RunMigrations to false, but we create the new schema anyway here because it's dynamic?

If we are doing this to support schema definitions specific to test suites for test isolation, maybe we could change how we read in a config and give the ability to overwrite aspects of it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these statements should come after the if block below checking if migrations should run.

@jakedoublev jakedoublev merged commit e1fd203 into policy-config-changes Jan 25, 2024
@jakedoublev jakedoublev deleted the jrschumacher/issue76-2 branch January 25, 2024 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants