public override void CanCreatePrimaryKeyConstraintWithCustomSchema()
        {
            var expression = GeneratorTestHelper.GetCreatePrimaryKeyExpression();

            expression.Constraint.SchemaName = "TestSchema";

            var result = Generator.Generate(expression);

            result.ShouldBe("ALTER TABLE `TestTable1` ADD CONSTRAINT `PK_TestTable1_TestColumn1` PRIMARY KEY (`TestColumn1`)");
        }
Exemplo n.º 2
0
        public override void CanCreatePrimaryKeyConstraintWithCustomSchema()
        {
            var expression = GeneratorTestHelper.GetCreatePrimaryKeyExpression();

            expression.Constraint.SchemaName = "TestSchema";

            var result = Generator.Generate(expression);

            result.ShouldBe(string.Empty);
        }
Exemplo n.º 3
0
        public override void CanCreatePrimaryKeyConstraintWithCustomSchema()
        {
            Assert.Ignore("HANA does not support schema like us know schema in hana is a database name");

            var expression = GeneratorTestHelper.GetCreatePrimaryKeyExpression();

            expression.Constraint.SchemaName = "TestSchema";

            var result = Generator.Generate(expression);

            result.ShouldBe("ALTER TABLE \"TestSchema\".\"TestTable1\" ADD CONSTRAINT \"PK_TestTable1_TestColumn1\" PRIMARY KEY (\"TestColumn1\")");
        }
        public override void CanCreatePrimaryKeyConstraintWithDefaultSchema()
        {
            var expression = GeneratorTestHelper.GetCreatePrimaryKeyExpression();

            Assert.Throws <DatabaseOperationNotSupportedException>(() => Generator.Generate(expression));
        }