<commit_before><f:view xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:fn="http://java.sun.com/jsp/jstl/functions"
        xmlns:u="http://code.google.com/p/ada-asf/util"
        xmlns:g="http://code.google.com/p/ada-ado/generator"
        xmlns:f="http://java.sun.com/jsf/core"
        file="db/#{model.dirname ne 'src' ? model.dirname : ''}#{model.dirname ne 'src' ? '/' : ''}postgresql/#{projectName}-postgresql.sql">
/* File generated automatically by dynamo */
<h:list value="#{model.tables}" var="table">
/* #{table.comment} */
CREATE TABLE #{table.table} (
<h:list value="#{table.members}" var="column">
  /* #{column.comment} */
  "#{fn:toLowerCase(column.sqlName)}" #{column.sqlType}#{column.unique ? ' UNIQUE' : ''} #{not column.isNull ? 'NOT NULL' : ''}#{column.isPrimaryKey and (table.id.generator eq 'increment') ? ' SERIAL' : ''},
</h:list><u:set var="counter" value="0"/>
  PRIMARY KEY (<h:list value="#{table.members}" var="column"><h:panelGroup rendered="#{column.isPrimaryKey}"><h:panelGroup rendered="#{counter ne 0}">, </h:panelGroup><u:set var="counter" value="#{counter + 1}"/>"#{fn:toLowerCase(column.sqlName)}"</h:panelGroup></h:list>)
);
</h:list>
<h:panelGroup rendered="#{not empty model.tables}">
INSERT INTO entity_type (name) VALUES
  <h:list value="#{model.tables}" var="table">
#{table.rowIndex ge 2 ? ',' : ''}('#{table.table}')
</h:list>;
</h:panelGroup>
<h:panelGroup rendered="#{not empty model.tables}">
  <h:list value="#{model.tables}" var="table">
    <h:list value="#{table.members}" var="column">
      <h:panelGroup rendered="#{column.isAuditable}">
INSERT INTO awa_audit_field (entity_type, name)
  VALUES ((SELECT id FROM entity_type WHERE name = "#{table.table}"), "#{column.name}");
      </h:panelGroup>
    </h:list>
</h:list>
</h:panelGroup>
</f:view><commit_msg>Fix autoincrement (SERIAL) table generation for Postgresql<commit_after><f:view xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:fn="http://java.sun.com/jsp/jstl/functions"
        xmlns:u="http://code.google.com/p/ada-asf/util"
        xmlns:g="http://code.google.com/p/ada-ado/generator"
        xmlns:f="http://java.sun.com/jsf/core"
        file="db/#{model.dirname ne 'src' ? model.dirname : ''}#{model.dirname ne 'src' ? '/' : ''}postgresql/#{projectName}-postgresql.sql">
/* File generated automatically by dynamo */
<h:list value="#{model.tables}" var="table">
/* #{table.comment} */
CREATE TABLE #{table.table} (
<h:list value="#{table.members}" var="column">
  /* #{column.comment} */
<h:panelGroup rendered="#{column.isPrimaryKey and column.generator eq 'increment'}">
  "#{fn:toLowerCase(column.sqlName)}" SERIAL,
</h:panelGroup>
<h:panelGroup rendered="#{not column.isPrimaryKey or column.generator ne 'increment'}">
  "#{fn:toLowerCase(column.sqlName)}" #{column.sqlType}#{column.unique ? ' UNIQUE' : ''} #{not column.isNull ? 'NOT NULL' : ''},
</h:panelGroup>
</h:list><u:set var="counter" value="0"/>
  PRIMARY KEY (<h:list value="#{table.members}" var="column"><h:panelGroup rendered="#{column.isPrimaryKey}"><h:panelGroup rendered="#{counter ne 0}">, </h:panelGroup><u:set var="counter" value="#{counter + 1}"/>"#{fn:toLowerCase(column.sqlName)}"</h:panelGroup></h:list>)
);
</h:list>
<h:panelGroup rendered="#{not empty model.tables}">
INSERT INTO entity_type (name) VALUES
  <h:list value="#{model.tables}" var="table">
#{table.rowIndex ge 2 ? ',' : ''}('#{table.table}')
</h:list>;
</h:panelGroup>
<h:panelGroup rendered="#{not empty model.tables}">
  <h:list value="#{model.tables}" var="table">
    <h:list value="#{table.members}" var="column">
      <h:panelGroup rendered="#{column.isAuditable}">
INSERT INTO awa_audit_field (entity_type, name)
  VALUES ((SELECT id FROM entity_type WHERE name = "#{table.table}"), "#{column.name}");
      </h:panelGroup>
    </h:list>
</h:list>
</h:panelGroup>
</f:view>
{'fraction_non_alphanumeric': 0.23148850138994187, 'fraction_numerical': 0.0020217336365933787, 'mean_word_length': 5.155520995334371, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3100072', 'n_tokens_mistral': 1417, 'n_tokens_neox': 1418, 'n_words': 236}