<commit_before>﻿using System;
using System.Data;
using FluentMigrator.Model;

namespace FluentMigrator.Runner.Generators
{
	class SqliteColumn : ColumnBase
	{
		public SqliteColumn() : base(new SqliteTypeMap(), new ConstantFormatter())
		{
		}

		protected override string FormatIdentity(ColumnDefinition column)
		{
			if (!column.IsIdentity)
				return string.Empty;

			//Assume that if its IDENTITY and PRIMARY KEY, the it should be an AUTOINCREMENT column
			return !column.IsPrimaryKey ? "IDENTITY" : string.Empty;
		}

		protected override string FormatPrimaryKey(ColumnDefinition column)
		{
			if (!column.IsPrimaryKey)
				return string.Empty;

			//Assume that if its IDENTITY and PRIMARY KEY, the it should be an AUTOINCREMENT column
			return !column.IsIdentity ? "PRIMARY KEY" : "PRIMARY KEY AUTOINCREMENT";
		}

        protected override string FormatSystemMethods(SystemMethods systemMethod)
        {
            throw new NotImplementedException();
        }

		protected override string FormatType(ColumnDefinition column)
		{
			if (column.IsIdentity)
				return GetTypeMap(DbType.Int32, column.Size, column.Precision);

			return base.FormatType(column);
		}
	}
}<commit_msg>Sqlite uses CURRENT_TIMESTAMP for default datetime<commit_after>﻿using System;
using System.Data;
using FluentMigrator.Model;

namespace FluentMigrator.Runner.Generators
{
	class SqliteColumn : ColumnBase
	{
		public SqliteColumn() : base(new SqliteTypeMap(), new ConstantFormatter())
		{
		}

		protected override string FormatIdentity(ColumnDefinition column)
		{
			if (!column.IsIdentity)
				return string.Empty;

			//Assume that if its IDENTITY and PRIMARY KEY, the it should be an AUTOINCREMENT column
			return !column.IsPrimaryKey ? "IDENTITY" : string.Empty;
		}

		protected override string FormatPrimaryKey(ColumnDefinition column)
		{
			if (!column.IsPrimaryKey)
				return string.Empty;

			//Assume that if its IDENTITY and PRIMARY KEY, the it should be an AUTOINCREMENT column
			return !column.IsIdentity ? "PRIMARY KEY" : "PRIMARY KEY AUTOINCREMENT";
		}

        protected override string FormatSystemMethods(SystemMethods systemMethod)
        {
            switch (systemMethod)
            {
                case SystemMethods.NewGuid:
                    throw new NotImplementedException();
                case SystemMethods.CurrentDateTime:
                    return "CURRENT_TIMESTAMP";
            }

            return null;
        }

		protected override string FormatType(ColumnDefinition column)
		{
			if (column.IsIdentity)
				return GetTypeMap(DbType.Int32, column.Size, column.Precision);

			return base.FormatType(column);
		}
	}
}
{'fraction_non_alphanumeric': 0.07712467240733807, 'fraction_numerical': 0.001497566454511419, 'mean_word_length': 3.3447154471544716, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '3309635', 'n_tokens_mistral': 848, 'n_tokens_neox': 736, 'n_words': 209}