conversations listlengths 2 3 | source stringclasses 1 value | stack stringclasses 1 value |
|---|---|---|
[
{
"from": "system",
"value": "Switch index creation to online mode\n\n"
},
{
"from": "human",
"value": "CREATE INDEX HPA_IDENT_SEARCH ON IIS.IIS_IDENTIFIER\n(\n PERSON_IDENT_TYPE_CODE,\n PERSON_IDENTIFIER_VALUE,\n FK_PERSON_IDENTIFIER\n)\n\nCREATE INDEX HPA_LOL_SEARCH ON IIS.LOSS_OF_LIB... | sql | chosen |
[
{
"from": "system",
"value": "Remove temp precompute table before creating\n\nIf it exists we should remove it so we don't have duplicate or extra\ndata to compute.\n"
},
{
"from": "human",
"value": "create table :tablename as\nselect distinct\n xref.upi\nfrom xref\nleft join rnc_rna_precompute... | sql | chosen |
[
{
"from": "system",
"value": "Revert \"Fix error on creating test schema for MySQL\"\n\nThis reverts commit cafeb47c80c3affa415c059fd6fe3099538cbfc6.\n"
},
{
"from": "human",
"value": "DROP TABLE IF EXISTS comments;\nDROP TABLE IF EXISTS posts_tags;\nDROP TABLE IF EXISTS posts;\nDROP TABLE IF EX... | sql | chosen |
[
{
"from": "system",
"value": "KCIRB-1497: Change default sort order (make Protocol and Protocol Review Comment equal)\n"
},
{
"from": "human",
"value": "UPDATE MINUTE_ENTRY_TYPE SET SORT_ID = 3 where DESCRIPTION='Adverse Events'\r\n/\r\nUPDATE MINUTE_ENTRY_TYPE SET SORT_ID = 5 where DESCRIPTION=... | sql | chosen |
[
{
"from": "system",
"value": "Set newline at end of file\n\nStops Git from complaining\n"
},
{
"from": "human",
"value": "CREATE TABLE mail_manager_log\n(\n id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,\n recipient VARCHAR(255) NOT NULL,\n subject VARCHAR(255) NOT NULL,\n body TEXT NO... | sql | chosen |
[
{
"from": "system",
"value": "Add order column in SQL for tests\n"
},
{
"from": "human",
"value": "BEGIN;\n\nINSERT INTO company VALUES (1, 'Test Company 1');\n\nINSERT INTO employee (person_id, name, firstname, login, password, driving_license, company_id) VALUES\n (1, 'admin', 'admin', 'adm... | sql | chosen |
[
{
"from": "system",
"value": "Update so rna types query\n\nThe database now has two columns for terms so we have to change the\nquery to reflect that to get the correct data out.\n"
},
{
"from": "human",
"value": "COPY (\nselect distinct\n pre.so_rna_type\nFROM rnc_rna_precomputed pre\nwhere\... | sql | chosen |
[
{
"from": "system",
"value": "Make sure pages show in articles subdir"
},
{
"from": "human",
"value": "SELECT\nFilePath = (\nCASE c.PostType \nWHEN 2 THEN 'articles-' + c.EntryName + '.aspx.markdown' \nELSE SUBSTRING(CONVERT(VARCHAR, DATEADD(hh, blog.TimeZoneOffset, c.DatePublishedUtc), 120), 1,... | sql | chosen |
[
{
"from": "system",
"value": "Add bit to test upgrade\n"
},
{
"from": "human",
"value": "-- Note: pgTap is loaded by setup.sql\nCREATE EXTENSION cat_tools;\n\n-- Add any test dependency statements here\n\n-- Used by several unit tests\n\\set no_use_role cat_tools_testing__no_use_role\n\\set use_... | sql | chosen |
[
{
"from": "system",
"value": "Add constraint on pg tables\n"
},
{
"from": "human",
"value": "\nCREATE TABLE messages (\n id integer NOT NULL,\n title character varying(255),\n message text,\n \"time\" text\n);\n\nCREATE TABLE suivi_news (\n id integer NOT NULL,\n dt_creat chara... | sql | chosen |
[
{
"from": "system",
"value": "Allow connections to wordpress_unit_tests database from host\n"
},
{
"from": "human",
"value": "# We include default installations of WordPress with this Vagrant setup.\n# In order for that to respond properly, default databases should be\n# available for use.\nCREA... | sql | chosen |
[
{
"from": "system",
"value": "Remove stored procedure due to wth\n\nI didn't think this through the right way. We don't need a stored procedure, we just need a command that doesn't error out.\n\nBy using GRANT PRIVILEGES without the CREATE USER command, we ensure that privileges are assigned whether the use... | sql | chosen |
[
{
"from": "system",
"value": "Increase max length of dataset.description to 100 chars.\n\n(Matching insert function to table definition)\n"
},
{
"from": "human",
"value": "--DROP FUNCTION insertDataset;\n\n/**\n * This function inserts a row in the datasets table,\n * and returns the value of th... | sql | chosen |
[
{
"from": "system",
"value": "Replace nbsp by proper space in SQL setup script"
},
{
"from": "human",
"value": "CREATE TABLE `LongTextTest`( entry1 LONGTEXT NOT NULL , entry2 MEDIUMTEXT NOT NULL , entry3 TEXT NOT NULL , entry4 VARCHAR(255) NOT NULL );\n\nCREATE TABLE `table_name`( id INT NOT NUL... | sql | chosen |
[
{
"from": "system",
"value": "Set proper root id on docker container\n"
},
{
"from": "human",
"value": "CREATE TABLE \"pogues\" (id VARCHAR PRIMARY KEY, data jsonb);\n-- Initialize ddi root ids\nCREATE TABLE \"ddi_group\" (id VARCHAR PRIMARY KEY);\nINSERT INTO \"ddi_group\" VALUES ('41c2eca1-8b1... | sql | chosen |
[
{
"from": "system",
"value": "Remove redundant index in JDBC schema scripts\n\nSee gh-1014\n"
},
{
"from": "human",
"value": "CREATE TABLE SPRING_SESSION (\n\tPRIMARY_ID CHAR(36) NOT NULL,\n\tSESSION_ID CHAR(36) NOT NULL,\n\tCREATION_TIME BIGINT NOT NULL,\n\tLAST_ACCESS_TIME BIGINT NOT NULL,\n\t... | sql | chosen |
[
{
"from": "system",
"value": "Add fields to Users and GC tables\n"
},
{
"from": "human",
"value": "DROP DATABASE IF EXISTS italian_workflow;\n\nCREATE DATABASE italian_workflow;\n\nUSE italian_workflow;\n\nCREATE TABLE Users (\n user_id INT UNSIGNED NOT NULL AUTO_INCREMENT,\n username VARC... | sql | chosen |
[
{
"from": "system",
"value": "Convert sentid to an int\n"
},
{
"from": "human",
"value": "-- This SQL script contains the instruction to create the tables. \n-- WARNING: all the tables are dropped and recreated\n\n-- Sentences table\nDROP TABLE IF EXISTS sentences CASCADE;\nCREATE TABLE sentence... | sql | chosen |
[
{
"from": "system",
"value": "Add missing condition for pg_depend in hstore migration script.\n\nError noted by Andres Freund.\n"
},
{
"from": "human",
"value": "/* contrib/hstore/hstore--1.1--1.2.sql */\n\n-- complain if script is sourced in psql, rather than via ALTER EXTENSION\n\\echo Use \"A... | sql | chosen |
[
{
"from": "system",
"value": "Add DROP TABLE statements for new total tables.\n"
},
{
"from": "human",
"value": "DROP TABLE IF EXISTS pageviews;\nDROP TABLE if exists visitors;\nDROP TABLE IF EXISTS pages;\nDROP TABLE IF EXISTS sites;\nDROP TABLE IF EXISTS users;\nDROP TABLE IF EXISTS archive;\n... | sql | chosen |
[
{
"from": "system",
"value": "Add owner_app to owner_id unique index\n"
},
{
"from": "human",
"value": "DROP TYPE IF EXISTS app;\nCREATE TYPE app AS ENUM ('telegram', 'vk');\n\nCREATE TABLE IF NOT EXISTS rooms (\n id SERIAL PRIMARY KEY,\n owner_id BIGINT NOT NULL,\n owner_app app NOT NULL,\n ... | sql | chosen |
[
{
"from": "human",
"value": "Add migration for log Tag Temperature\n"
},
{
"from": "gpt",
"value": "DROP TABLE IF EXISTS log_tags;\n\nCREATE TABLE log_tags\n(\n id serial not null,\n logdate character varying(100),\n logtime character varying(100),\n temperature character varying(100),\n ... | sql | chosen |
[
{
"from": "system",
"value": "Correct incorrect SQL on table definition\n\n"
},
{
"from": "human",
"value": "CREATE PROCEDURE [dbo].[InsertHistory]\n\t@entityType NVARCHAR(50) = NULL,\n\t@entityId BIGINT = NULL, \n\t@commitmentId BIGINT NULL = NULL, \n\t@apprenticeshipId BIGINT = NULL, \n @u... | sql | chosen |
[
{
"from": "system",
"value": "Update unique term validation to include the language code\n"
},
{
"from": "human",
"value": "/******************************************************************************** \n\tcomponent-centric-snapshot-description-unique-term-in-concept\n\n\tAssertion:\n\tFor a... | sql | chosen |
[
{
"from": "system",
"value": "Handle duplicate end slice events in startup traces\n\nBug: 233732092\nChange-Id: I8f6449397132c7fa245955f2f216f88c59faf764"
},
{
"from": "human",
"value": "--\n-- Copyright 2022 The Android Open Source Project\n--\n-- Licensed under the Apache License, Version 2.0 ... | sql | chosen |
[
{
"from": "system",
"value": "Fix NOT NULL in license column\n"
},
{
"from": "human",
"value": "ALTER TABLE \"organism_representation\" ADD \"license\" text NOT NULL;\nCOMMENT ON COLUMN \"organism_representation\".\"license\" IS 'License of the obtained representation.';"
},
{
"from": "g... | sql | chosen |
[
{
"from": "system",
"value": "Change SQL to leading comma style.\n"
},
{
"from": "human",
"value": "CREATE TABLE users (\n id SERIAL PRIMARY KEY,\n username VARCHAR( 64 ) UNIQUE,\n encrypted_password VARCHAR( 512 ),\n time_created TIMESTAMP ... | sql | chosen |
[
{
"from": "system",
"value": "Add an index on ViewCount in Posts table.\n"
},
{
"from": "human",
"value": "-- hash index takes too long to create\nCREATE INDEX posts_post_type_id_idx on Posts USING btree (PostTypeId)\n WITH (FILLFACTOR = 100);\nCREATE INDEX posts_score_idx on Posts USING b... | sql | chosen |
[
{
"from": "system",
"value": "Add db index to improve speed of get_open_games\n"
},
{
"from": "human",
"value": "create table games (\n id char(48) primary key,\n data jsonb\n);\n"
},
{
"from": "gpt",
"value": "create table games (\n id char(48) primary key,\n data jsonb\... | sql | chosen |
[
{
"from": "system",
"value": "Fix Cote d'Ivoire name in countries table\n\n"
},
{
"from": "human",
"value": "alter table `users` add `ls` int not null default 0;"
},
{
"from": "gpt",
"value": "alter table `users` add `ls` int not null default 0;\r\n\r\nset names utf8;\r\nupdate `coun... | sql | chosen |
[
{
"from": "system",
"value": "Drop huts tables as well.\n\n--HG--\nbranch : js-redesign\n"
},
{
"from": "human",
"value": "use hutmap;\ndrop table if exists auth_group;\ndrop table if exists auth_group_permissions;\ndrop table if exists auth_message;\ndrop table if exists auth_permission;\ndrop ... | sql | chosen |
[
{
"from": "system",
"value": "Set relevant default to 1 instead of true\n\n\nFormer-commit-id: 2fc3f4b32d71a721ecec4af9838b60817ef8de48"
},
{
"from": "human",
"value": "CREATE TABLE job(\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n description TEXT NOT NULL,\n user_name TEXT NOT NULL,\n... | sql | chosen |
[
{
"from": "system",
"value": "Add the new column for search options\n"
},
{
"from": "human",
"value": "CREATE DATABASE notes;\n\nUSE notes;\n\nCREATE TABLE note_users (\n UserId CHAR(32) PRIMARY KEY,\n UserEmail VARCHAR(255),\n UserPassword VARCHAR(512),\n EmailConfirmation CHAR(32),... | sql | chosen |
[
{
"from": "system",
"value": "Add constraints to schema creation.\n"
},
{
"from": "human",
"value": "CREATE TABLE users (\n\tid INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),\n\tname VARCHAR(25) NOT NULL,\n\tpassword VARCHAR(65),\n\tCONSTRAINT users_pk PRIMARY KEY ... | sql | chosen |
[
{
"from": "system",
"value": "Add compund index to dependencies table\n"
},
{
"from": "human",
"value": "create table dependencies (\n project_uuid varchar(255) not null references projects(uuid),\n dependent_project_uuid varchar(255) not null references projects(uuid),\n source_cd smal... | sql | chosen |
[
{
"from": "system",
"value": "Add placetype column to WOF neighbourhood table\n"
},
{
"from": "human",
"value": "CREATE TABLE wof_neighbourhood (\n wof_id BIGINT UNIQUE NOT NULL,\n name TEXT NOT NULL,\n hash TEXT NOT NULL,\n n_photos INTEGER,\n label_position geometry(Point, 900913) NOT NUL... | sql | chosen |
[
{
"from": "system",
"value": "Remove constraint flight depart before arrive\n\nThis is true for an instant in time, but need to see if date-time and\ntimezones are correct.\n"
},
{
"from": "human",
"value": "\\connect airline\n\nCREATE TABLE PNRNum (\n PNR CHAR(6) PRIMARY KEY,\n Boo... | sql | chosen |
[
{
"from": "system",
"value": "Add requested_account to list of tables to remove\n"
},
{
"from": "human",
"value": "-- -------------------\n-- Apply changes to rename abac, identity, account portal tables\n-- (make inaccessible from existing code, but archive)\n-- See geni-portal #299\n-- -------... | sql | chosen |
[
{
"from": "system",
"value": "Drop existing trigger before re-creating.\n"
},
{
"from": "human",
"value": "-- Attach the trigger to the requested table\n\nCREATE TRIGGER \"update_log_{db_table}\"\n AFTER INSERT OR UPDATE OR DELETE\n ON \"{db_table}\"\n FOR EACH ROW\n EXECUTE PROCEDUR... | sql | chosen |
[
{
"from": "system",
"value": "Use a shorter issuer/subject key due to mysql limitations\n"
},
{
"from": "human",
"value": "CREATE TABLE user (\n id INT PRIMARY KEY AUTO_INCREMENT,\n username VARCHAR(64) NOT NULL,\n issuer VARCHAR(256) NOT NULL,\n subject VARCHAR(256) NOT NULL,\n n... | sql | chosen |
[
{
"from": "system",
"value": "Rework conact info as nested.\n"
},
{
"from": "human",
"value": "select private.create_model(\n\n-- Model name, schema, table\n\n'contact_info', 'public', 'cntct',\n\n-- Columns\n\nE'{\n \"cntct.cntct_id as guid\",\n \"cntct.cntct_name as name\",\n \"cntct.cntct_... | sql | chosen |
[
{
"from": "system",
"value": "Remove category id from view\n"
},
{
"from": "human",
"value": "CREATE VIEW `page_id_categories` AS (\nSELECT p.page_id, c.id, c.name\nFROM pages_categories p\nLEFT JOIN categories c\nON p.category_id = c.id\n);"
},
{
"from": "gpt",
"value": "CREATE VIEW... | sql | chosen |
[
{
"from": "system",
"value": "Change join criteria to elections when loading props\n"
},
{
"from": "human",
"value": "INSERT INTO calaccess_processed_proposition (\n id,\n name,\n election_id\n )\nSELECT\n scraped.scraped_id::INTEGER AS id,\n scr... | sql | chosen |
[
{
"from": "system",
"value": "Create hstore extension for travis\n"
},
{
"from": "human",
"value": "CREATE ROLE pass_user PASSWORD 'password' LOGIN;\nCREATE ROLE md5_user PASSWORD 'password' LOGIN;\n"
},
{
"from": "gpt",
"value": "CREATE ROLE pass_user PASSWORD 'password' LOGIN;\nCRE... | sql | chosen |
[
{
"from": "system",
"value": "Switch from utf8 to utf8mb4\n"
},
{
"from": "human",
"value": "CREATE TABLE `sessions` (\n `id` char(32) CHARSET 'ascii' NOT NULL,\n `timestamp` int unsigned NOT NULL,\n `data` longtext NOT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n"
}... | sql | chosen |
[
{
"from": "system",
"value": "Fix nasty timing-dependent Heisenbug in TweetActorsPerformanceSpec by replacing table DROP and re-CREATE by the TRUNCATE CQL command\n"
},
{
"from": "human",
"value": "DROP TABLE tweets;\n\nCREATE TABLE tweets (\n key text PRIMARY KEY,\n user_user varchar,\n text... | sql | chosen |
[
{
"from": "system",
"value": "Fix naming error in assessments export file\n"
},
{
"from": "human",
"value": "use x2data\nSELECT\n 'state_id',\n 'school_id',\n 'assessment_id',\n 'assessment_date',\n 'assessment_scale_score',\n 'assessment_perf_level',\n 'assessment_name',\n 'assessment_s... | sql | chosen |
[
{
"from": "system",
"value": "Move part of SQL chunk to memora\n"
},
{
"from": "human",
"value": "\n-- tabulate a column\n\nSELECT col, COUNT(*)\nFROM\nGROUP BY col\nORDER BY col DESC;\n\n-- get a sample\n\nWHERE random() < 0.05\nLIMIT 30\n\n-- truncate, with sequence reset\n\nTRUNCATE TABLE t... | sql | chosen |
[
{
"from": "system",
"value": "Change int zero padding length; map to unix TS len"
},
{
"from": "human",
"value": "# Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)\n#\n# Licensed under The MIT License\n# For full copyright and license information, please see the LICENSE... | sql | chosen |
[
{
"from": "system",
"value": "Set no case collation on log properties names/values\n"
},
{
"from": "human",
"value": "-- Copyright (C) 2017 Alaa Masoud\n-- See the LICENSE file in the project root for more information.\n\nCREATE TABLE IF NOT EXISTS log(\n\tid TEXT NOT NULL PRIMARY KEY,\n\tmessag... | sql | chosen |
[
{
"from": "system",
"value": "Rename column name, tweet_id -> twitter_tweet_id.\n"
},
{
"from": "human",
"value": "DROP DATABASE IF EXISTS fizzbuzz_twitterbot;\nCREATE DATABASE fizzbuzz_twitterbot CHARACTER SET utf8;\nUSE fizzbuzz_twitterbot;\n\nDROP TABLE IF EXISTS fizzbuzz_tweets;\nCREATE TABL... | sql | chosen |
[
{
"from": "system",
"value": "Update switchign to not-nulls for name and nhs on charity\n"
},
{
"from": "human",
"value": "IF EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'charity' AND COLUMN_NAME='name' AND COLUMN_DEFAULT IS NULL)\nBEGIN\n\tALTER TABLE [CharityData].[char... | sql | chosen |
[
{
"from": "system",
"value": "Increase size of password field\n\nPHP needs 60 characters for the bcrypt hashes."
},
{
"from": "human",
"value": "CREATE TABLE accounts (\n account_id int NOT NULL AUTO_INCREMENT,\n account_enabled BOOLEAN NOT NULL,\n email CHAR(254) NOT NULL,\n passwor... | sql | chosen |
[
{
"from": "system",
"value": "INSERT COMMUNE - Ne pas utiliser id_type en dur"
},
{
"from": "human",
"value": "SET search_path = ref_geo, pg_catalog;\n\nINSERT INTO l_areas (id_type, area_code, area_name, geom)\nSELECT 101 AS id_type, insee_com, nom_com, geom FROM temp_fr_municipalities;\n\nTRUN... | sql | chosen |
[
{
"from": "system",
"value": "Add guard for Flyway migration 1_0_8 (add column service_provider)\n"
},
{
"from": "human",
"value": "ALTER TABLE service\n ADD service_provider_class VARCHAR(255) DEFAULT NULL;\nALTER TABLE plan\n ADD service_provider_class VARCHAR(255) DEFAULT NULL;"
},
{
... | sql | chosen |
[
{
"from": "system",
"value": "Fix typo in sql file\n"
},
{
"from": "human",
"value": "create table class_group_identifier (\n id int NOT NULL CHECK (id > 0),\n name varchar(1024) NOT NULL,\n \n PRIMARY KEY (id)\n);\n\ncreate table run_results (\n benchmark_group_id int NOT NULL CHECK (bench... | sql | chosen |
[
{
"from": "system",
"value": "Remove unnecessary drop tables for hmhb_user\n\n* Removes unnecessary drop tables for hmhb_user now that it is gone.\n"
},
{
"from": "human",
"value": "DROP TABLE IF EXISTS hmhb_user; /* get rid of this in the next PR */\n\nDROP TABLE IF EXISTS requested_program;\nD... | sql | chosen |
[
{
"from": "system",
"value": "Fix for mssql upgrade (typo in table name)\n"
},
{
"from": "human",
"value": "update ACT_GE_PROPERTY set VALUE_ = '5.17.0.0' where NAME_ = 'schema.version';\n\nalter table ACT_RE_PROCEDEF add HAS_GRAPHICAL_NOTATION_ tinyint;\n\t\n"
},
{
"from": "gpt",
"v... | sql | chosen |
[
{
"from": "system",
"value": "Add timestamp to speakeasy metrics\n"
},
{
"from": "human",
"value": "\n# Select limit = 3 für die besten 3 Länder. \n\n-------\n-- Petition metrics\n-------\ndrop table if exists speakeasy_petition_metrics;\n\ncreate table speakeasy_petition_metrics\n(\nid int not ... | sql | chosen |
[
{
"from": "system",
"value": "ADD \"replicate_def\" table in \"pgpool_catalog\" schema\n"
},
{
"from": "human",
"value": "-- $Header$\n\nDROP TABLE pgpool_catalog.dist_def;\nDROP TABLE pgpool_catalog.query_cache;\nDROP SCHEMA pgpool_catalog;\n\n\nCREATE SCHEMA pgpool_catalog;\n\nCREATE TABLE pgp... | sql | chosen |
[
{
"from": "system",
"value": "Add dropping of commodprices table to SQL migration scripts\n"
},
{
"from": "human",
"value": "DROP TABLE IF EXISTS `obj_load_min_level`;\nDROP TABLE IF EXISTS `shopgoldtmp`;\nDROP TABLE IF EXISTS `talenhistory`;\n"
},
{
"from": "gpt",
"value": "DROP TAB... | sql | chosen |
[
{
"from": "system",
"value": "Fix SQL for database setup.\n"
},
{
"from": "human",
"value": "use memegendb;\ncreate table MemeInfo if not exists (\n id bigint auto_increment primary key ,\n filename varchar(256) unique,\n upvotes bigint,\n downvotes bigint,\n createdby varchar(256),\n ... | sql | chosen |
[
{
"from": "system",
"value": "Fix the too length of index name for the pdc tables with Oracle\n"
},
{
"from": "human",
"value": "CREATE INDEX IN_SB_Pdc_Axis_1 ON SB_Pdc_Axis(AxisType);\r\n\r\nCREATE INDEX IN_SB_Pdc_Utilization_1 ON SB_Pdc_Utilization(baseValue);\r\nCREATE INDEX IN_SB_Pdc_Utiliza... | sql | chosen |
[
{
"from": "system",
"value": "Convert kite table to an unlogged table"
},
{
"from": "human",
"value": "-- create a schema for our tables\nCREATE SCHEMA kite;\n\n-- give usage access to schema for our role\nGRANT USAGE ON SCHEMA kite TO kontrol;\n\n-- create the table\nCREATE TABLE \"kite\".\"kit... | sql | chosen |
[
{
"from": "system",
"value": "Add additional order by columns for tpc-h query 11\n\nQuery results are not stable for larger scale factors.\nThis change does NOT follow current tpc-h specification.\n"
},
{
"from": "human",
"value": "SELECT \n ps.partkey, \n sum(ps.supplycost*ps.availqty) AS val... | sql | chosen |
[
{
"from": "system",
"value": "DERBY-4169: Change two SMALLINT routine args to be INT so that they will match the corresponding int args of the target Java method.\n\ngit-svn-id: 2c06e9c5008124d912b69f0b82df29d4867c0ce2@766722 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "human",
"value":... | sql | chosen |
[
{
"from": "system",
"value": "Drop function from public and create in pg_catalog\n\nFixes #600\n"
},
{
"from": "human",
"value": "DROP FUNCTION master_update_shard_statistics(shard_id bigint);\n\nCREATE FUNCTION pg_catalog.master_update_shard_statistics(shard_id bigint)\n RETURNS bigint\n ... | sql | chosen |
[
{
"from": "system",
"value": "KCIAC-39: Create initial tables for IACUC protocol submission (bloody spaces...)\n"
},
{
"from": "human",
"value": "CREATE TABLE IACUC_SUBMISSION_TYPE (\r\n SUBMISSION_TYPE_CODE VARCHAR2(3) NOT NULL,\r\n DESCRIPTION VARCHAR2(200) NOT NULL,\r\n UPDATE_TIMEST... | sql | chosen |
[
{
"from": "system",
"value": "Apply message refactoring to owner db"
},
{
"from": "human",
"value": "-- DatasetHolder is no longer unique for MessageEvents\nDROP INDEX IF EXISTS IDX_ME_UNIQUE_DATASETHOLDER_ID;\n-- add the field for the serialized set of unconfirmed message uris\nALTER TABLE mess... | sql | chosen |
[
{
"from": "system",
"value": "KRACOEUS-6384: Delete COI Annual Review Due date from table for now\n"
},
{
"from": "human",
"value": "INSERT INTO KRCR_PARM_T (NMSPC_CD, CMPNT_CD, PARM_NM, OBJ_ID, VER_NBR, PARM_TYP_CD, VAL, PARM_DESC_TXT, EVAL_OPRTR_CD, APPL_ID)\nVALUES ('KC-COIDISCLOSURE', 'Docum... | sql | chosen |
[
{
"from": "system",
"value": "Set relevant default to 1 instead of true\n\n\nFormer-commit-id: edfc6d2e214fca189c6ac9d61642b2f7b5b4ee80 [formerly 2fc3f4b32d71a721ecec4af9838b60817ef8de48]\nFormer-commit-id: 970f1a8eb55140b3b13adfd50673d8279c36fe9a"
},
{
"from": "human",
"value": "CREATE TABLE jo... | sql | chosen |
[
{
"from": "system",
"value": "Fix adverts software update bug with dumped data\n"
},
{
"from": "human",
"value": "ALTER TABLE adverts\n ADD COLUMN maxPlayCount TINYINT UNSIGNED NULL,\n ADD COLUMN maxDailyPlayCount TINYINT UNSIGNED NULL,\n ADD COLUMN assignedShow INT(11) UNSIGNED ZEROFILL NULL... | sql | chosen |
[
{
"from": "system",
"value": "Add migration script for max stock quantity\n"
},
{
"from": "human",
"value": "ALTER TABLE master_rnr_columns\nADD calculation_options varchar(200) default 'DEFAULT';\n\nALTER TABLE program_rnr_columns\nADD calculation_option VARCHAR(200) default 'DEFAULT';\n\n"
}... | sql | chosen |
[
{
"from": "system",
"value": "Adjust initial database, breaking down the address in separate fields\n"
},
{
"from": "human",
"value": "DROP TABLE IF EXISTS users cascade;\n\nCREATE TABLE users (\n user_id SERIAL PRIMARY KEY NOT NULL,\n first_name TEXT,\n last_name TEXT,\n birth_date DATE,\n ... | sql | chosen |
[
{
"from": "system",
"value": "Add an explicit commit statement at the end of the system.sql script.\nThis should force commit the changes applied by the previous scripts, s.t. when these are executed on SQL store init, they are applied.\n"
},
{
"from": "human",
"value": "-- The contents of this ... | sql | chosen |
[
{
"from": "system",
"value": "Truncate table in patch to avoid duplicate null values.\n"
},
{
"from": "human",
"value": "alter table user\n add username varchar(255) not null after password,\n add unique key(username);\n"
},
{
"from": "gpt",
"value": "truncate table user;\nalter ta... | sql | chosen |
[
{
"from": "system",
"value": "Remove @skip since test is now functioning correctly\n"
},
{
"from": "human",
"value": "-- @Description Test vmem shown in the live view matches the amount in memory accounting\n-- @skip Memory accounting failed to capture the memory allocation in UDF. Enable this t... | sql | chosen |
[
{
"from": "system",
"value": "Fix strange unnest of composite typed array in is_unique()\n"
},
{
"from": "human",
"value": "CREATE OR REPLACE FUNCTION array_length(ANYARRAY)\n RETURNS INTEGER\nSTRICT\nIMMUTABLE\nLANGUAGE SQL AS\n'SELECT coalesce(array_length($1, 1), 0) AS array_length;';\n\n-- ... | sql | chosen |
[
{
"from": "system",
"value": "Update Scripts for release 2\n\nKCAWD-312\n"
},
{
"from": "human",
"value": "CREATE TABLE AWARD_REPORT_TERMS ( \r\n\tAWARD_REPORT_TERMS_ID NUMBER(12,0) NOT NULL, \r\n\tAWARD_ID NUMBER(12,0) NOT NULL,\r\n\tAWARD_NUMBER VARCHAR2(12) NOT NULL, \r\n\tSEQUENCE_NUMBER NUM... | sql | chosen |
[
{
"from": "system",
"value": "Update store proc to support monthly transaction searches\n"
},
{
"from": "human",
"value": "CREATE PROCEDURE [employer_financial].[GetTransactionLines_ByAccountId]\n\t@accountId BIGINT\nAS\nselect \n main.*\n ,SUM(Amount) OVER(ORDER BY DateCreated,Transactio... | sql | chosen |
[
{
"from": "system",
"value": "Fix cron.Schedule() to reset cron.Processes.RunAtTime when a job has been killed\n"
},
{
"from": "human",
"value": "CREATE OR REPLACE FUNCTION cron.Schedule(_Function regprocedure, _ProcessID integer DEFAULT NULL)\nRETURNS boolean\nLANGUAGE plpgsql\nSET search_path ... | sql | chosen |
[
{
"from": "system",
"value": "Fix Northwestern OF aggregate data.\n\nFix certificate file location. Fix comments to reflect the right\naggregate.\n"
},
{
"from": "human",
"value": "-- -----------------------------------------------------------------\n-- Create the entry for InstaGENI Utah FOAM a... | sql | chosen |
[
{
"from": "system",
"value": "Add initial attributes tables (schema related attributes).\n"
},
{
"from": "human",
"value": "CREATE TYPE partition AS ENUM ('system', 'schema', 'user');\n\n-- A table that will store the whole transaction log\n-- of the database.\nCREATE TABLE IF NOT EXISTS txlog (... | sql | chosen |
[
{
"from": "system",
"value": "Make sure _meta table has originalVersion and installDate\n"
},
{
"from": "human",
"value": "USE pufferpanel;\n\nSET FOREIGN_KEY_CHECKS = 0;\n\nCREATE TABLE IF NOT EXISTS `_meta` (\n `metaId` INT(11) NOT NULL AUTO_INCREMENT,\n `metaKey` VARCHAR(20) NOT NULL,\n `m... | sql | chosen |
[
{
"from": "system",
"value": "Hide NOTICE messages when creating the database, especially when the database is not dropped because it does not exist.\n"
},
{
"from": "human",
"value": "-- Script: create_database.sql\n--\n-- Description: Creates (or recreates) the ABRAID-MP database itself. Must ... | sql | chosen |
[
{
"from": "system",
"value": "Add AACR's Clinical Cancer Research metadata"
},
{
"from": "human",
"value": "Title\tISSN\teISSN\nCancer Discovery\t2159-8274\t2159-8290\nCancer Epidemiology, Biomarkers & Prevention\t1055-9965\t1538-7755\nCancer Immunology Research\tx\tx\nCancer Prevention Research... | sql | chosen |
[
{
"from": "system",
"value": "Move default values into application logic\n"
},
{
"from": "human",
"value": "CREATE TABLE IF NOT EXISTS content (\n id integer PRIMARY KEY AUTOINCREMENT,\n hashId text UNIQUE NOT NULL,\n url text UNIQUE NOT NULL,\n state text NOT NULL DEFAULT('initialized'),\n ... | sql | chosen |
[
{
"from": "system",
"value": "Fix of update.sql (wrong table)\n\n"
},
{
"from": "human",
"value": "-- Update Script for Database from Master to layout_symbols\r\nALTER TABLE `resilienz-test`.`layouts` ADD COLUMN `symbol` VARCHAR(2) NOT NULL AFTER `name`;\r\n\r\nUPDATE `resilienz-test`.`layouts` ... | sql | chosen |
[
{
"from": "system",
"value": "Move recordlabel info to int table before deleting it\n"
},
{
"from": "human",
"value": "INSERT INTO library_recordlabel (SELECT RefCode, labelid FROM library);||\nALTER TABLE `library` DROP FOREIGN KEY `Record`;||\nALTER TABLE `library` DROP INDEX `Label_idx`;||\nA... | sql | chosen |
[
{
"from": "system",
"value": "Fix unix domain socket tests on CI\n"
},
{
"from": "human",
"value": "-- Create extensions and types.\ncreate extension hstore;\ncreate domain uint64 as numeric(20,0);\n\n-- Create users for different types of connections and authentication.\ncreate user pgx_ssl PAS... | sql | chosen |
[
{
"from": "system",
"value": "Fix SQL Scripts to Support Newer MySQL Versions\n"
},
{
"from": "human",
"value": "CREATE\n ALGORITHM = UNDEFINED\n DEFINER = `root`@`localhost`\n SQL SECURITY DEFINER\nVIEW `global_addressbook` AS\n SELECT\n SUBSTR((UNIX_TIMESTAMP(`vmail`.`mailbo... | sql | chosen |
[
{
"from": "system",
"value": "Add comment about where opioid_measure data comes from"
},
{
"from": "human",
"value": "SELECT\n month,\n practice,\n pct,\n SUM(quantity*dose_per_unit*ome_multiplier) AS total_ome\nFROM\n {project}.{hscic}.normalised_prescribing_standard AS presc\nJOIN\n ebmd... | sql | chosen |
[
{
"from": "system",
"value": "Include educators with no LASID in educators export file\n\n+ https://github.com/studentinsights/studentinsights/issues/683#issuecomment-246809532\n"
},
{
"from": "human",
"value": "use x2data\nSELECT\n 'state_id',\n 'local_id',\n 'full_name',\n 'staff_type',\n ... | sql | chosen |
[
{
"from": "system",
"value": "Fix shop offer table structure\n"
},
{
"from": "human",
"value": "CREATE TABLE `castro_shop_offers` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `name` varchar(45) DEFAULT NULL,\n `description` varchar(255) DEFAULT NULL,\n `created_at` int(11) DEFAULT NULL,\n `u... | sql | chosen |
[
{
"from": "system",
"value": "Update the admin settings table with the new verify users and allow registration parts."
},
{
"from": "human",
"value": "CREATE TABLE `wi_adminsetting` (\n `id` int(11) NOT NULL auto_increment,\n `startregion` varchar(255) NOT NULL,\n `userdir` varchar(255) NOT N... | sql | chosen |
[
{
"from": "system",
"value": "Check if kwc_mail_views table exists before creating it in update script\n"
},
{
"from": "human",
"value": "CREATE TABLE `kwc_mail_views` (\n`id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,\n`mail_component_id` VARCHAR( 255 ) NOT NULL ,\n`recipient_id` INT( 11 )... | sql | chosen |
[
{
"from": "system",
"value": "Set mandatory data as non-null\n"
},
{
"from": "human",
"value": "CREATE TABLE builds (\n id SERIAL,\n created TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),\n\n key VARCHAR(100) NOT NULL\n);\n\nCREATE INDEX builds_idx_key ON builds (key);\n\n\nCREATE TABLE log... | sql | chosen |
[
{
"from": "system",
"value": "Update the migration SQL script to add the new column in the awa_comment table\n\n"
},
{
"from": "human",
"value": "ALTER TABLE awa_blog ADD COLUMN `url` VARCHAR(255) BINARY NOT NULL;\n\nALTER TABLE awa_post CHANGE `text` `text` TEXT NOT NULL;\nALTER TABLE awa_quest... | sql | chosen |
[
{
"from": "system",
"value": "Fix tabs in file as it causes fails in the execution\n"
},
{
"from": "human",
"value": "/******************************************************************************** \nfile-centric-snapshot-mdrs-no-version-skew.sql\n Assertion:\n \"Target modules in th... | sql | chosen |
[
{
"from": "system",
"value": "Change tag order to match infoQuestion.json order\n"
},
{
"from": "human",
"value": "\n-- Returns a JSON array describing the tags for question question_id.\n\nCREATE OR REPLACE FUNCTION\n tags_for_question (question_id bigint) RETURNS JSONB AS $$\nSELECT\n JS... | sql | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.