github.com/Accefy/pop@v0.0.0-20230428174248-e9f677eab5b9/testdata/migrations/20210104145901_context_tables.up.fizz (about)

     1  {{ if eq .Dialect "sqlite3" }}
     2      create_table("context_prefix_a_table") {
     3          t.Column("id", "string", { primary: true })
     4          t.Column("value", "string")
     5      }
     6  
     7      create_table("context_prefix_b_table") {
     8          t.Column("id", "string", { primary: true })
     9          t.Column("value", "string")
    10      }
    11  {{ end }}
    12  
    13  {{ if eq .Dialect "mysql" }}
    14      create_table("context_prefix_a_table") {
    15          t.Column("id", "string", { primary: true })
    16          t.Column("value", "string")
    17      }
    18  
    19      create_table("context_prefix_b_table") {
    20          t.Column("id", "string", { primary: true })
    21          t.Column("value", "string")
    22      }
    23  {{ end }}
    24  
    25  {{ if eq .Dialect "postgres" }}
    26      sql("CREATE SCHEMA IF NOT EXISTS \"context_prefix_a\";COMMIT TRANSACTION;BEGIN TRANSACTION;")
    27      sql("CREATE SCHEMA IF NOT EXISTS \"context_prefix_b\";COMMIT TRANSACTION;BEGIN TRANSACTION;")
    28      sql("CREATE TABLE \"context_prefix_a\".\"a_table\" (id character varying(255) NOT NULL, value character varying(255) NOT NULL, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL);COMMIT TRANSACTION;BEGIN TRANSACTION;")
    29      sql("CREATE TABLE \"context_prefix_b\".\"b_table\" (id character varying(255) NOT NULL, value character varying(255) NOT NULL, created_at timestamp without time zone NOT NULL, updated_at timestamp without time zone NOT NULL);COMMIT TRANSACTION;BEGIN TRANSACTION;")
    30  {{ end }}