<commit_before>﻿using System;
using CSM.ParkingData.Models;
using Orchard.Data.Migration;

namespace CSM.ParkingData
{
    public class Migrations : DataMigrationImpl
    {
        public int Create()
        {
            SchemaBuilder.CreateTable(
                typeof(SensorEvent).Name,
                table => table
                    .Column<long>("Id", col => col.PrimaryKey().Identity())
                    .Column<long>("TransmissionId", col => col.NotNull().Unique())
                    .Column<string>("ClientId", col => col.NotNull().WithLength(128))
                    .Column<long>("SessionId", col => col.NotNull().WithLength(128))
                    .Column<string>("EventType", col => col.NotNull().WithLength(2))
                    .Column<DateTime>("TransmissionTime", col => col.NotNull())
                    .Column<DateTime>("EventTime", col => col.NotNull())
                    .Column<long>("MeteredSpace_Id", col => col.NotNull())
            );

            var precision = byte.Parse("9");
            var scale = byte.Parse("6");

            SchemaBuilder.CreateTable(
                typeof(MeteredSpace).Name,
                table => table
                    .Column<long>("Id", col => col.PrimaryKey().Identity())
                    .Column<string>("MeterId", col => col.NotNull().Unique())
                    .Column<string>("Area", col => col.WithLength(128))
                    .Column<string>("SubArea", col => col.WithLength(128))
                    .Column<string>("Zone", col => col.WithLength(128))
                    .Column<decimal>("Latitude", col => col.Nullable().WithPrecision(precision).WithScale(scale))
                    .Column<decimal>("Longitude", col => col.Nullable().WithPrecision(precision).WithScale(scale))
                    .Column<bool>("Active", col => col.Nullable())
            );

            return 1;
        }
    }
}<commit_msg>column length can be reduced<commit_after>﻿using System;
using CSM.ParkingData.Models;
using Orchard.Data.Migration;

namespace CSM.ParkingData
{
    public class Migrations : DataMigrationImpl
    {
        public int Create()
        {
            SchemaBuilder.CreateTable(
                typeof(SensorEvent).Name,
                table => table
                    .Column<long>("Id", col => col.PrimaryKey().Identity())
                    .Column<long>("TransmissionId", col => col.NotNull().Unique())
                    .Column<string>("ClientId", col => col.NotNull().WithLength(128))
                    .Column<long>("SessionId", col => col.NotNull().WithLength(128))
                    .Column<string>("EventType", col => col.NotNull().WithLength(2))
                    .Column<DateTime>("TransmissionTime", col => col.NotNull())
                    .Column<DateTime>("EventTime", col => col.NotNull())
                    .Column<long>("MeteredSpace_Id", col => col.NotNull())
            );

            var precision = byte.Parse("9");
            var scale = byte.Parse("6");

            SchemaBuilder.CreateTable(
                typeof(MeteredSpace).Name,
                table => table
                    .Column<long>("Id", col => col.PrimaryKey().Identity())
                    .Column<string>("MeterId", col => col.NotNull().Unique().WithLength(128))
                    .Column<string>("Area", col => col.WithLength(128))
                    .Column<string>("SubArea", col => col.WithLength(128))
                    .Column<string>("Zone", col => col.WithLength(128))
                    .Column<decimal>("Latitude", col => col.Nullable().WithPrecision(precision).WithScale(scale))
                    .Column<decimal>("Longitude", col => col.Nullable().WithPrecision(precision).WithScale(scale))
                    .Column<bool>("Active", col => col.Nullable())
            );

            return 1;
        }
    }
}
{'fraction_non_alphanumeric': 0.15110098709187547, 'fraction_numerical': 0.010377119716527461, 'mean_word_length': 1.7675070028011204, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 71, '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': '3569244', 'n_tokens_mistral': 1063, 'n_tokens_neox': 988, 'n_words': 162}