conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Expand column COMMENT.ACTION to VARCHAR(20).\n"
},
{
"from": "human",
"value": "ALTER TABLE ACCOUNT ADD COLUMN IMAGE VARCHAR(100);\n"
},
{
"from": "gpt",
"value": "ALTER TABLE ACCOUNT ADD COLUMN IMAGE VARCHAR(100);\n\nALTER TABLE COMMENT ALTER COLUMN ACT... | sql | chosen |
[
{
"from": "system",
"value": "Fix encoding of SQL file\n"
},
{
"from": "human",
"value": "--\n-- RaiseActorError\n-- \n--\n\nif not exists ( select * from sys.procedures where name = 'RaiseActorError' )\n exec sp_executesql N'create procedure RaiseActorError as begin return 0; end;'\ngo\n\n\n... | sql | chosen |
[
{
"from": "system",
"value": "TASK: Increase max-length for cache entries in PdoBackend\n\nWhen not using SQLite for the PdoBackend and manually creating\nthe cache tables by using the DDL.sql, the content column of the\ncache table with type TEXT could easily lead to cropped\ncaching entries because of the... | sql | chosen |
[
{
"from": "system",
"value": "Read speakeasy unsub from 10d timebox\n"
},
{
"from": "human",
"value": "INSERT INTO speakeasy_petition_metrics (activity, campaign_id, npeople)\n SELECT\n 'unsub', campaign_id, sum(r.value)\n FROM civicrm_mailing m\n LEFT JOIN data_mailing_counter r ON r.mail... | sql | chosen |
[
{
"from": "system",
"value": "Update the study table and the relative foreign keys in the variatiation_annotation table\n"
},
{
"from": "human",
"value": "# add a study_id column in the tables structural_variation and variation_annotation\n\nALTER TABLE structural_variation ADD COLUMN study_id i... | sql | chosen |
[
{
"from": "system",
"value": "Add query to complete task\n"
},
{
"from": "human",
"value": "-- :name find-all-tasks :? :*\nselect id, description, done from todo\n\n-- :name find-incomplete-tasks :? *\nselect id, description, done from todo where not done\n"
},
{
"from": "gpt",
"valu... | sql | chosen |
[
{
"from": "system",
"value": "Add additional indicies to database tables\n"
},
{
"from": "human",
"value": "CREATE TABLE wcf1_packageserver_package_to_group (\n\tpackageIdentifier VARCHAR(255),\n\tgroupID INT(10),\n\tpermissionString MEDIUMTEXT,\n\tPRIMARY KEY(packageIdentifier,groupID)\n);\n\nC... | sql | chosen |
[
{
"from": "system",
"value": "Fix query to avoid some unwanted results\n"
},
{
"from": "human",
"value": "CONNECT itwiki_p itwiki.labsdb;\nSELECT CONCAT('# [[Template:', page_title, ']] -> [[', pl_title, ']]')\nFROM pagelinks,\n page\nWHERE page_namespace = 10\n AND page_id = pl_from\n AND... | sql | chosen |
[
{
"from": "system",
"value": "Update instead of adding new records to info table"
},
{
"from": "human",
"value": "##version: 1.0.0\nCREATE TABLE info (DB_SCHEMA_VERSION VARCHAR(8));\nINSERT INTO info VALUES (\"1.0.0\");\n\n##version: 1.1.0\nCREATE TABLE sample_list LIKE patient_list;\nINSERT sam... | sql | chosen |
[
{
"from": "system",
"value": "Remove schema name \"app_next\" in migration script\n"
},
{
"from": "human",
"value": "-- Put upgrade SQL here\nCREATE TABLE _auth_verify_code (\n id text PRIMARY KEY,\n user_id text NOT NULL REFERENCES app_next._core_user(id),\n record_key text NOT NULL,\n... | sql | chosen |
[
{
"from": "system",
"value": "Edit SQL statements to correct syntax\n"
},
{
"from": "human",
"value": "CREATE TABLE Countries(\n\tName VARCHAR(30) CLUSTERED PRIMARY KEY\n);\n\nCREATE TABLE Persons(\n\tName VARCHAR(30) CLUSTERED PRIMARY KEY,\n\tCountry VARCHAR(30),\n\tFOREIGN KEY Country REFERENC... | sql | chosen |
[
{
"from": "system",
"value": "Add table names to all fields.\n"
},
{
"from": "human",
"value": "select\n\tBlog_Article.ID,\n\tBlog.ID as ID_Blog,\n\tBlog_User.ID as ID_User,\n\tBlog_User.username,\n\tBlog_User.firstName,\n\tBlog_User.lastName,\n\ttitle,\n\tcontent,\n\tcoverImageUrl,\n\tdateTimeC... | sql | chosen |
[
{
"from": "system",
"value": "Fix for places with no origin\n\nsuch as 127.0.0.1\n"
},
{
"from": "human",
"value": "CREATE TABLE IF NOT EXISTS ip_storage (\n ip CIDR PRIMARY KEY,\n country_code TEXT CHECK (char_length(country_code) = 2),\n\n accessed BIGINT DEFAULT 1,\n last_updated ... | sql | chosen |
[
{
"from": "system",
"value": "Use UNIX time format for timestamps in hash table\n"
},
{
"from": "human",
"value": "-- git_hash table\n-- \n-- Stores ONLY metadata about commits that MediaWiki CANNOT store.\n-- \n-- The other tables git_status_modify_hash and git_edit_hash store\n-- actual CHANGE... | sql | chosen |
[
{
"from": "system",
"value": "Add guid and content column to lysr_feed_entry\n"
},
{
"from": "human",
"value": "CREATE TABLE lysr_user (\n\tid BIGSERIAL PRIMARY KEY,\n\temail VARCHAR(255) UNIQUE,\n\tpassword VARCHAR(60)\n);\n\nCREATE TABLE lysr_user_settings (\n\tid BIGSERIAL PRIMARY KEY,\n\tuse... | sql | chosen |
[
{
"from": "system",
"value": "Delete the nono scan all schedule in migration\n\nSigned-off-by: wang yan <63b20dea16c07a874bc9bf767df5575676113cb6@vmware.com>\n"
},
{
"from": "human",
"value": "/*\nRename the duplicate names before adding \"UNIQUE\" constraint\n*/\nDO $$\nBEGIN\n WHILE EXISTS ... | sql | chosen |
[
{
"from": "system",
"value": "Use the offline performance profiling.\n"
},
{
"from": "human",
"value": "set optimizer='inline,remap,evaluate,costModel,coercions,emptySet,mitosis,aliases,mergetable,octopus,commonTerms,accumulators,deadcode,reduce,garbageCollector,dataflow,history,multiplex';\nexp... | sql | chosen |
[
{
"from": "system",
"value": "Remove additional checks for column and data existance from 'add_item_key_to_entry' migration script\n\nWe don't have to check that as we can assume the database should not have those (key column, data in that column) as the Flyway db versioning should provide that assurance fo... | sql | chosen |
[
{
"from": "system",
"value": "Change to demographic ViralLoad query.\n"
},
{
"from": "human",
"value": "/*\r\n * Copyright (c) 2010-2012 LabKey Corporation\r\n *\r\n * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0\r\n */\r\nSELECT\r\n v.Id,\r\n max(... | sql | chosen |
[
{
"from": "system",
"value": "Change to EF default value when getting LineDetail\n\nChanged the default EF value to be 1 to match the default that we apply\nin the calculation of 100%. This is to correct a display bug of showing\n0% when it should be 100%\n"
},
{
"from": "human",
"value": "CREA... | sql | chosen |
[
{
"from": "system",
"value": "Remove index from DB version update 12 script\n\nSigned-off-by: Carter Landis <84a516841ba77a5b4648de2cd0dfcb30ea46dbb4@carterlandis.com>\n"
},
{
"from": "human",
"value": "CREATE SEQUENCE \"augur_operations\".\"worker_oauth_oauth_id_seq\" \nINCREMENT 1\nMINVALUE 1... | sql | chosen |
[
{
"from": "system",
"value": "Add sql for altering table"
},
{
"from": "human",
"value": "-- ALTER TABLE \"subscription\" ADD COLUMN \"uuid\" uuid;\r\n-- ALTER TABLE \"subscription\" ADD COLUMN \"eventpublished\" boolean NOT NULL DEFAULT false;\r\n-- ALTER TABLE \"subscriptionhistory\" ADD \"eve... | sql | chosen |
[
{
"from": "system",
"value": "Simplify the column creation sql for user_data\n"
},
{
"from": "human",
"value": "CREATE TABLE IF NOT EXISTS `sgf_sessions` (\n `session_id` varchar(40) collate utf8_bin NOT NULL default '0',\n `ip_address` varchar(16) collate utf8_bin NOT NULL default '0',\n `us... | sql | chosen |
[
{
"from": "system",
"value": "Add UUID to interventions view"
},
{
"from": "human",
"value": "CREATE VIEW {# geotrek.maintenance #}.v_interventions AS (\n\n\tSELECT e.geom, i.*\n\tFROM maintenance_intervention AS i, core_topology AS e, signage_blade as b\n\tWHERE (i.target_id = e.id AND i.targe... | sql | chosen |
[
{
"from": "system",
"value": "Create additional security database fields"
},
{
"from": "human",
"value": "/**\n * Creates database tables for storing security data.\n *\n * Copyright 2014 Mohiva Organisation (license at mohiva dot com)\n *\n * Licensed under the Apache License, Version 2.0 (the ... | sql | chosen |
[
{
"from": "system",
"value": "CREATE OR REPLACE FUNCTION on that file\n\nSigned-off-by: Michael Casadevall <6fe105eefab41990d7ec714c6c25ade3095cdb48@them.com>\n"
},
{
"from": "human",
"value": "CREATE FUNCTION admin.select_organization_by_name(org_name text) RETURNS SETOF public.organizations\n ... | sql | chosen |
[
{
"from": "system",
"value": "Update drop table order to clean all tables\n"
},
{
"from": "human",
"value": "-- $ heroku pg:psql < create.sql\n\nDROP TABLE requests;\nDROP TABLE members;\nDROP TABLE teams;\nDROP TABLE shifts;\n\n\n-- days_in_shift: The days included in a shift table\n-- max_shif... | sql | chosen |
[
{
"from": "system",
"value": "Create index on statuses (read) for performance reasons.\n"
},
{
"from": "human",
"value": "CREATE TABLE if not EXISTS articles (articleID TEXT NOT NULL PRIMARY KEY, feedID TEXT NOT NULL, uniqueID TEXT NOT NULL, title TEXT, contentHTML TEXT, contentText TEXT, url TE... | sql | chosen |
[
{
"from": "system",
"value": "Remove sourceeffectivetime check. Any modules that are referenced should only have one version referenced in the snapshot\n"
},
{
"from": "human",
"value": "/******************************************************************************** \nfile-centric-snapshot-mdr... | sql | chosen |
[
{
"from": "system",
"value": "Make sure the table name is recognized on linux"
},
{
"from": "human",
"value": "DROP TABLE IF EXISTS `plm_file`;\nCREATE TABLE `plm_file` (\n `id` bigint(20) NOT NULL,\n `filename` varchar(255) NULL,\n `file_type` varchar(255) NOT NULL,\n `data` MEDIUMBLOB NOT... | sql | chosen |
[
{
"from": "system",
"value": "Repair vagrant: core postgres database init script.\n"
},
{
"from": "human",
"value": "create user vagrant with createdb password '';\ncreate database vagrant with owner vagrant;\ngrant all on database vagrant to vagrant;\n\\c template1\ncreate extension tablefunc;\... | sql | chosen |
[
{
"from": "system",
"value": "KRACOEUS-5216: Correct syntax error in script\n"
},
{
"from": "human",
"value": "ALTER TABLE EPS_PROPOSAL ADD COLUMN ANTICIPATED_AWARD_TYPE_CODE NUMBER(3)\n/\n\n"
},
{
"from": "gpt",
"value": "ALTER TABLE EPS_PROPOSAL ADD COLUMN ANTICIPATED_AWARD_TYPE_CO... | sql | chosen |
[
{
"from": "system",
"value": "Add settings for has_invitation field of csiprova2 meeting\n"
},
{
"from": "human",
"value": "-- Inizio script\r\n/*!40101 SET character_set_client = latin1 */;\r\n/*!40103 SET TIME_ZONE='+00:00' */;\r\n\r\nSET AUTOCOMMIT=0;\r\nSTART TRANSACTION;\r\n\r\n-- Add sched... | sql | chosen |
[
{
"from": "system",
"value": "KCIAC-16: Implement Questionnaire functionality in IACUC\n"
},
{
"from": "human",
"value": "INSERT INTO KRIM_PERM_T (PERM_ID,OBJ_ID,VER_NBR,PERM_TMPL_ID,NMSPC_CD,NM,DESC_TXT,ACTV_IND)\r\nVALUES (KRIM_PERM_ID_BS_S.nextval,SYS_GUID,1,(SELECT PERM_TMPL_ID from KRIM_PER... | sql | chosen |
[
{
"from": "system",
"value": "Add fix for versions that contain the NULL string.\n"
},
{
"from": "human",
"value": "# patch_39_40_c\n#\n# title: xref version \n#\n# description:\n# Change version column in xref to be default 0, not allow null\n\nALTER TABLE xref CHANGE COLUMN version version VAR... | sql | chosen |
[
{
"from": "system",
"value": "KCIAC-332: Implement COI event type of \"IACUC Protocol\"\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)\r\nVALUES ('KC-IACUC', 'Document', 'PROTOCOL_... | sql | chosen |
[
{
"from": "system",
"value": "Add person_id column to table\n\n\nFormer-commit-id: e4669deb69c4b453ffce8e97ba093eb5e1e17197"
},
{
"from": "human",
"value": "BEGIN;\n\nDROP TABLE IF EXISTS Model_Views;\n\nCREATE TABLE Model_Views AS\nSELECT logged_at, ip_address, node_id\n FROM Logged_Actions\n ... | sql | chosen |
[
{
"from": "system",
"value": ":bug: Add missing sql sentence on migration 0009.\n"
},
{
"from": "human",
"value": "DROP INDEX profile_email__profile_id__idx;\nDROP INDEX profile_email__email__idx;\nDROP TABLE profile_email;\n"
},
{
"from": "gpt",
"value": "DROP INDEX profile_email__p... | sql | chosen |
[
{
"from": "system",
"value": "Delete openids of expired users.\n\n\ngit-svn-id: 757818eefc3e095bf4f5c16d67ad3f55b5150c3d@786 072f9a9a-8cf7-0310-8ca5-bf92c90cb7c1\n"
},
{
"from": "human",
"value": "-- run as a cronjob: psql packages -f tools/daily.sql -o /dev/null\ndelete from cookies where last_... | sql | chosen |
[
{
"from": "system",
"value": "Delete old GO annotations prior to loading\n\nThis will prevent keeping outdated annotations around.\n"
},
{
"from": "human",
"value": "INSERT INTO rfam_go_terms (\n ontology_term_id,\n rfam_model_id\n) (\nSELECT\n ontology_term_id,\n rfam_model_id\nFROM... | sql | chosen |
[
{
"from": "system",
"value": "Fix DB command for API status hopper entries.\n\n"
},
{
"from": "human",
"value": "# 04/30/2010\n\nALTER TABLE osdial_hopper MODIFY status `status` enum('READY','QUEUE','INCALL','DONE','HOLD','API') DEFAULT 'READY';##|##\n ## Added status for API insertion.;\n\nU... | sql | chosen |
[
{
"from": "system",
"value": "Fix migrations where this is no down\n\nhttps://github.com/rubenv/sql-migrate/commit/91d84b099ee092589e8b792a62ac3518d3fde391\n"
},
{
"from": "human",
"value": "-- +migrate Up\nINSERT INTO tools (name, url, path, args, `regexp`) VALUES\n (\"gosimple\", \"https://... | sql | chosen |
[
{
"from": "system",
"value": "Drop the index before the column to prevent weirdness, and add an 'allow_anonymous_evals' boolean for apps that want to do things that way.\n"
},
{
"from": "human",
"value": "# ---!Ups\nalter table application_users drop column secret_key;\nalter table users add col... | sql | chosen |
[
{
"from": "human",
"value": "Resolve conflict on script file version\n"
},
{
"from": "gpt",
"value": "--add new column\nALTER TABLE user\nADD c4sg_developer_flg CHAR(1) NOT NULL DEFAULT 'N';\n\n--load data in the column\nUPDATE User\nSET c4sg_developer_flg = 'Y' \nWHERE id IN (2,8, 12, 18,22,28,... | sql | chosen |
[
{
"from": "system",
"value": "Delete will also send the key\n"
},
{
"from": "human",
"value": "CREATE OR REPLACE FUNCTION _gc2_notify_transaction()\n RETURNS TRIGGER AS $$\nDECLARE\n t text;\nBEGIN\n IF TG_OP = 'INSERT' OR TG_OP = 'UPDATE'\n THEN\n EXECUTE 'SELECT $1.'||TG_ARGV[0] USING N... | sql | chosen |
[
{
"from": "system",
"value": "Remove fixed ID from migration adding 'Experiments:submit' group\n"
},
{
"from": "human",
"value": "INSERT INTO groups (id, name, rules, notes, created, modified) VALUES\n (50052, 'Submit experiments (auto signed)', 'Experiments:submit', '', NOW(), NOW());\n"
},
... | sql | chosen |
[
{
"from": "system",
"value": "Improve security by using user management for DB\n"
},
{
"from": "human",
"value": "CREATE DATABASE `ssbo_ticketing` CHARACTER SET utf8 COLLATE utf8_general_ci;\n\nUSE ssbo_ticketing;\n\nCREATE TABLE IF NOT EXISTS tickets (\n\tcode\t\tVARCHAR(27) NOT NULL,\n\tfirstn... | sql | chosen |
[
{
"from": "system",
"value": "Fix SQL statement to prevent always asking for updates\n"
},
{
"from": "human",
"value": "#\n# Table structure for table 'tx_tevglossary_domain_model_entry'\n#\n\nCREATE TABLE tx_tevglossary_domain_model_entry (\n uid int(11) unsigned NOT NULL auto_increment,\n ... | sql | chosen |
[
{
"from": "system",
"value": "Change for the hashedaccountid to allow nulls.\n"
},
{
"from": "human",
"value": "CREATE TABLE [account].[Account]\n(\n\t[Id] BIGINT NOT NULL PRIMARY KEY IDENTITY, \n\t[HashedAccountId] NVARCHAR(100) NOT NULL,\n [Name] NVARCHAR(100) NOT NULL \n)\nGO\n\nCREATE UN... | sql | chosen |
[
{
"from": "system",
"value": "Add data to populate on re-deploy.\n"
},
{
"from": "human",
"value": "-- Note: When adding new tables, also add the tables to dropSchema.sql and clearSchema in order for tests to work correctly.\n\nCREATE EXTENSION IF NOT EXISTS pgcrypto;\n\nCREATE TABLE IF NOT EXIS... | sql | chosen |
[
{
"from": "system",
"value": "vagrant: Disable broken migration that prevents tidings migration from executing\n"
},
{
"from": "human",
"value": "--\n-- The unique constraint got left out of an earlier actioncounters migration,\n-- so this schematic migration forcibly cleans up the few duplicate... | sql | chosen |
[
{
"from": "system",
"value": "Add a constraint and comment to verified\n"
},
{
"from": "human",
"value": "BEGIN;\n CREATE TABLE emails\n ( id serial PRIMARY KEY\n , address text NOT NULL\n , verified boolean ... | sql | chosen |
[
{
"from": "system",
"value": "Add ordering to player_standings view\n"
},
{
"from": "human",
"value": "-- Table definitions for the tournament project.\n--\n-- Put your SQL 'create table' statements in this file; also 'create view'\n-- statements if you choose to use it.\n--\n-- You can write co... | sql | chosen |
[
{
"from": "system",
"value": "Add closing character to sql line"
},
{
"from": "human",
"value": "\ncreate index if not exists source_dataset_version_log_source_dataset_version_id_create_time_idx on source_dataset_version_log using btree(source_dataset_version_id, create_time)\n\ninsert into publ... | sql | chosen |
[
{
"from": "system",
"value": "Fix non-reentrant metadata am: e6b3c2f713 am: 3a05525f32\nam: 4ffb570dd9\n\nChange-Id: I748a3a9c7a500a4de09c64ac476fd5df3dd0f088\n"
},
{
"from": "human",
"value": "--\n-- Copyright 2019 The Android Open Source Project\n--\n-- Licensed under the Apache License, Versi... | sql | chosen |
[
{
"from": "system",
"value": "Add an if exists to drop trigger in update to make idempotent\n"
},
{
"from": "human",
"value": "ALTER TABLE instance\n ADD CONSTRAINT no_duplicate_synonyms UNIQUE (name_id, reference_id, instance_type_id, page, cites_id, cited_by_id);\n\nALTER TABLE tree_arrangeme... | sql | chosen |
[
{
"from": "system",
"value": "KRACOEUS-3206: Change proposal log status to submitted after promoting it to an institutional proposal\n"
},
{
"from": "human",
"value": "delete from PROPOSAL_LOG;\r\ndelete from PROPOSAL_LOG_STATUS;\r\ninsert into PROPOSAL_LOG_STATUS (PROPOSAL_LOG_STATUS_CODE, DESC... | sql | chosen |
[
{
"from": "system",
"value": "Use bytea rather than BLOB\n"
},
{
"from": "human",
"value": "/* Copyright 2015 OpenMarket Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of... | sql | chosen |
[
{
"from": "system",
"value": "Add mod_time, move compressed up one layer.\n"
},
{
"from": "human",
"value": "\nDROP TABLE IF EXISTS file CASCADE;\n\nCREATE TABLE file (\n ufn VARCHAR(64) NOT NULL,\n uhn VARCHAR(64) NOT NULL,\n hostname VARCHAR(255) NOT NULL,\n path... | sql | chosen |
[
{
"from": "system",
"value": "Format SQL with Google SQL style\n"
},
{
"from": "human",
"value": "#standardSQL\n\n-- Copyright 2018 Google LLC\n--\n-- Licensed under the Apache License, Version 2.0 (the \"License\");\n-- you may not use this file except in compliance with the License.\n-- You ma... | sql | chosen |
[
{
"from": "system",
"value": "Revert \"Intentionally breaking code to check build failure on CI. <Jaideep>\" - verified it :)\n\nThis reverts commit d3ae2a1d546506eb2d8e4c0a393ca7bbd4825053.\n"
},
{
"from": "human",
"value": "--liquibase formatted sql\n\n--changeset JAIDEEP:1\nCREATE TABLE PERSO... | sql | chosen |
[
{
"from": "system",
"value": "Add updated function to db alter sql\n"
},
{
"from": "human",
"value": "-- These are changes needed to the schema to support moving over to DBIx::Class\n\nbegin;\n\n-- table for sessions - needed by Catalyst::Plugin::Session::Store::DBIC\nCREATE TABLE sessions (\n ... | sql | chosen |
[
{
"from": "system",
"value": "Drop the old table not the new table\n"
},
{
"from": "human",
"value": "/* Copyright 2015 OpenMarket Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain... | sql | chosen |
[
{
"from": "system",
"value": "Correct index for identifier search\n\n"
},
{
"from": "human",
"value": "CREATE INDEX HPA_KA_SEARCH ON IIS.KNOWN_AS\n(\n PERSON_SURNAME,\n PERSON_FORENAME_1,\n PERSON_BIRTH_DATE,\n FK_PERSON_IDENTIFIER\n)\n\nCREATE INDEX HPA_LOL_SEARCH ON IIS.LOSS_OF_LIB... | sql | chosen |
[
{
"from": "system",
"value": "Update patterns table with new indexesπ\n"
},
{
"from": "human",
"value": "CREATE TABLE aircraftpatterns (\n mode_s_hex TEXT,\n report_location GEOGRAPHY(Point, 4326),\n longitude83 DOUBLE PRECISION,\n latitude83 DOUBLE PRECISION,\n report_epoch ... | sql | chosen |
[
{
"from": "system",
"value": "Fix migration to drop all tables at once\n\nForeign key constraints between the tables were preventing the migration\nfrom chain/chainprv#654 from running successfully.\n\nCloses chain/chainprv#659.\nReviewers: da39a3ee5e6b4b0d3255bfef95601890afd80709@jeffomatic\n"
},
{
... | sql | chosen |
[
{
"from": "system",
"value": "Add new pre migration check\n"
},
{
"from": "human",
"value": "-- A set of SQL queries to run before migrating from v6 to v7\n-- Run with the mysql --table arg to get formatted output\n-- e.g.\n-- docker exec -i stroom-all-dbs mysql --table -h\"localhost\" -P\"3307\... | sql | chosen |
[
{
"from": "system",
"value": "Remove relations between contact templates and contactgroups\n"
},
{
"from": "human",
"value": "-- Change version of Centreon\nUPDATE `informations` SET `value` = '2.8.3' WHERE CONVERT( `informations`.`key` USING utf8 ) = 'version' AND CONVERT ( `informations`.`valu... | sql | chosen |
[
{
"from": "system",
"value": "Increase the length of content type\n\nThis is to accommodate a lengthy one such as multipart/form-data with\nits boundary definition.\n"
},
{
"from": "human",
"value": "CREATE TABLE builds (\n id SERIAL,\n created TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),\... | sql | chosen |
[
{
"from": "system",
"value": "Fix nombre script SQL actualización\n"
},
{
"from": "human",
"value": "BEGIN;\n\n--\n-- Actualización al día 18 de septiembre de 2018\n--\n\n-- agregar sucursal a dte_tmp\nALTER TABLE dte_tmp ADD sucursal_sii INTEGER;\nCREATE INDEX dte_tmp_sucursal_sii_idx ON dte_tm... | sql | chosen |
[
{
"from": "system",
"value": "Change sql to avoid startup errors if already initialized."
},
{
"from": "human",
"value": "CREATE TABLE CWF_DOMAIN (\n\tID VARCHAR(20) PRIMARY KEY,\n\tNAME VARCHAR(255),\n\tATTRIBUTES CLOB DEFAULT '');\n\nINSERT INTO CWF_DOMAIN (ID, NAME, ATTRIBUTES) VALUES\n\t('1'... | sql | chosen |
[
{
"from": "system",
"value": "Add create extension and fix fdw errors\n"
},
{
"from": "human",
"value": "--Remember to change the options for production!!!\n\nCREATE SERVER apply_server\nFOREIGN DATA WRAPPER postgres_fdw\nOPTIONS (host 'localhost', port '5432', dbname 'apply');\n\nCREATE USER MA... | sql | chosen |
[
{
"from": "system",
"value": "KCCOI-90: Add ability to associate attachments to Financial Entities\n"
},
{
"from": "human",
"value": "CREATE TABLE FINANCIAL_ENTITY_ATTACHMENT\n (FINANCIAL_ENTITY_ATTACHMENT_ID NUMBER(12,0) NOT NULL ENABLE, \n FINANCIAL_ENTITY_ID_FK NUMBER(12,0) NOT NULL ENAB... | sql | chosen |
[
{
"from": "system",
"value": "Add new table to upgrade SQL file\n\ngit-svn-id: 496ab2bd9c9a782235c11388890d59de1024c1f0@2920 91079597-3006-4846-9bd3-4f3fb3d139a7\n"
},
{
"from": "human",
"value": "CREATE TABLE IF NOT EXISTS `uploadfile` (\n `id` int(11) NOT NULL auto_increment,\n `filename` va... | sql | chosen |
[
{
"from": "system",
"value": "Set relevant default to 1 instead of true\n\n\nFormer-commit-id: edfc6d2e214fca189c6ac9d61642b2f7b5b4ee80 [formerly edfc6d2e214fca189c6ac9d61642b2f7b5b4ee80 [formerly 2fc3f4b32d71a721ecec4af9838b60817ef8de48]]\nFormer-commit-id: 970f1a8eb55140b3b13adfd50673d8279c36fe9a\nFormer-... | sql | chosen |
[
{
"from": "system",
"value": "Fix SQL syntax in the examples\n"
},
{
"from": "human",
"value": "CREATE TABLE HELLOWORLD (\n HELLO VARCHAR(15),\n WORLD VARCHAR(15),\n DIALECT VARCHAR(15) NOT NULL,\n PRIMARY KEY (DIALECT)\n);\nPARTITION TABLE HELLOWORLD ON COLUMN DIALECT;\n\nCREATE PROCEDU... | sql | chosen |
[
{
"from": "system",
"value": "INFUND-9352: Update academic grant percentage of all competitions\n"
},
{
"from": "human",
"value": "-- Update the value of the academic grant percentage for both the template competitions\nSET @sector_template_name = \"Template for the Sector competition type\";\nS... | sql | chosen |
[
{
"from": "human",
"value": "Add data to tables Comment and Feedback\n"
},
{
"from": "gpt",
"value": "INSERT INTO tender.comment values \n(0, 1, 1, 'This price is too high', '2014-02-02'), \n(0, 1, 2, 'This is my opinion', '2014-02-17'),\n(0, 2, 1, 'hello', '2014-05-28'),\n(0, 2, 1, 'This price ... | sql | chosen |
[
{
"from": "system",
"value": "Add DELETE statement to fix broken data in users_history table\n"
},
{
"from": "human",
"value": "ALTER TABLE `users_history`\n CHANGE COLUMN `user_id` `user_id` INT (11) NOT NULL,\n CHANGE COLUMN `created` `created` DATETIME (6) NOT NULL,\n CHANGE COLUMN `... | sql | chosen |
[
{
"from": "system",
"value": "Trim leading and trailing whitespace and replace blanks with null in ObjectImagesExport view\n"
},
{
"from": "human",
"value": "CREATE OR REPLACE VIEW ObjectImagesExport AS\nSELECT\n o.ItemType,\n i.Accession_Full_ID,\n o.ItemName,\n ObjectsImagesID,\n ... | sql | chosen |
[
{
"from": "system",
"value": "Reorder SQL Script (Truncate before Creating PK).\n"
},
{
"from": "human",
"value": "DROP PROCEDURE IF EXISTS create_IDX_PK_service_details;\nDELIMITER //\n\nCREATE PROCEDURE create_IDX_PK_service_details()\n BEGIN\n\n CREATE TEMPORARY TABLE `tmp_service_instance_... | sql | chosen |
[
{
"from": "system",
"value": "Fix up indices for users_who_share_rooms\n"
},
{
"from": "human",
"value": "/* Copyright 2017 Vector Creations Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You ... | sql | chosen |
[
{
"from": "system",
"value": "Add a test for returning strings from PL/Perl6\n"
},
{
"from": "human",
"value": "\\unset ECHO\n\\set QUIET 1\n-- Turn off echo and keep things quiet.\n-- Format the output for nice TAP.\n\\pset format unaligned\n\\pset tuples_only true\n\\pset pager\n-- Revert all ... | sql | chosen |
[
{
"from": "system",
"value": "Add default value for user.account_type field to trackit\n"
},
{
"from": "human",
"value": "-- Copyright 2020 MSolution.IO\n--\n-- Licensed under the Apache License, Version 2.0 (the \"License\");\n-- you may not use this file except in compliance with the Lic... | sql | chosen |
[
{
"from": "system",
"value": "Define intermediate views to allow further calculations\n"
},
{
"from": "human",
"value": ".print 'Load database'\n.read ../../../database/database.sql\n\n.mode csv\n.headers on\n\n.print 'Query the database to build the crosstabulation table'\n.once crosstab.csv\nS... | sql | chosen |
[
{
"from": "system",
"value": "Switch off foreign key checks for smoother running\n\nCo-authored-by: Cristina Guijarro-Clarke <291b71af759f231f3e92fd4fb607b369559f7039@ebi.ac.uk>\n"
},
{
"from": "human",
"value": "-- See the NOTICE file distributed with this work for additional information\n-- re... | sql | chosen |
[
{
"from": "system",
"value": "KCIAC-55: Update action code for Amendment Created notification\n"
},
{
"from": "human",
"value": "UPDATE NOTIFICATION_TYPE SET ACTION_CODE='323' WHERE MODULE_CODE='9' AND DESCRIPTION='IACUC Protocol Amendment Created Action'\r\n/\r\n"
},
{
"from": "gpt",
... | sql | chosen |
[
{
"from": "system",
"value": "Make query for largest images more friendly\n"
},
{
"from": "human",
"value": "SELECT\n content.hashId, content.numViews, image.width, image.height\nFROM\n content, image\nWHERE\n content.id = image.contentid AND\n content.state = 'completed:success'\nORDER BY (... | sql | chosen |
[
{
"from": "system",
"value": "Make sure area migration works with test data\n"
},
{
"from": "human",
"value": "-- Add area to country (in square km).\n-- Copyright (c) 2014 University of Oxford\n\nALTER TABLE country ADD COLUMN area double precision;\nUPDATE country SET area=st_area(st_transform... | sql | chosen |
[
{
"from": "system",
"value": "Update selectors search question script.\n"
},
{
"from": "human",
"value": "create table blog_post_subject(\n post_id int UNSIGNED NOT NULL, \n subject_id int UNSIGNED NOT NULL,\n CONSTRAINT pk_ps PRIMARY KEY(post_id, subject_id),\n FOREIGN KEY (post_id)... | sql | chosen |
[
{
"from": "system",
"value": "Make table changes remember status before changeing\n"
},
{
"from": "human",
"value": "ALTER TABLE `contest` CHANGE `status` `status` ENUM( 'Open', 'Closed' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'Open';\nALTER TABLE `contest` ADD `vis... | sql | chosen |
[
{
"from": "system",
"value": "Fix the migration script of the reminder module when upgrading to version 003\n"
},
{
"from": "human",
"value": "exec sp_rename 'sb_reminder.trigger_durationProp', trigger_prop, 'COLUMN';\n\nALTER TABLE sb_reminder\n ADD process_name VARCHAR(200);\n\nUPDATE sb_re... | sql | chosen |
[
{
"from": "system",
"value": "Add selection tools by default for featuredata2\n"
},
{
"from": "human",
"value": "\nINSERT INTO portti_bundle (name, startup) \n VALUES ('featuredata2','{}');\n\nUPDATE portti_bundle set startup = '{\n \"title\" : \"Feature data\",\n \"fi\" : \"featured... | sql | chosen |
[
{
"from": "system",
"value": "Remove variable t while keeping same behaviour\n\nThe t variable had no use since there was no swapping between variables.\r\nThe use of a temporary variable would have been needed in an case like this: \r\n a:=1; b:=2;\r\n temp:=a; a:=b; b:=temp;\r\n a:=2; b:=1;\r\n\r\n... | sql | chosen |
[
{
"from": "system",
"value": "Update DB Script for loan counter changes\n"
},
{
"from": "human",
"value": "ALTER TABLE `m_client_loan_counter`\n\tADD COLUMN `group_id` BIGINT(20) NOT NULL AFTER `client_id`,\n\tADD CONSTRAINT `FK_m_group_loan_counter` FOREIGN KEY (`group_id`) REFERENCES `m_group`... | sql | chosen |
[
{
"from": "system",
"value": "Update the DB2 query used to create AM_USAGE_UPLOAD_FILES table\n"
},
{
"from": "human",
"value": "\nCREATE TABLE IF NOT EXISTS AM_USAGE_UPLOADED_FILES (\n FILE_NAME varchar(255) NOT NULL,\n FILE_TIMESTAMP TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP,\n FILE_PROCESS... | sql | chosen |
[
{
"from": "system",
"value": "Change CRS for area calculation to Zhi's suggestion\n"
},
{
"from": "human",
"value": "-- Add area to country (in square km). \"COALESCE with 0\" is for compatibility with \"create.test.database\", where some countries lack geoms.\n-- Copyright (c) 2014 University o... | sql | chosen |
[
{
"from": "system",
"value": "Fix type in coupon fixture data.\n"
},
{
"from": "human",
"value": "--\n-- Table structure for table `shoppingcart_coupon`\n--\n\nDROP TABLE IF EXISTS `shoppingcart_coupon`;\nCREATE TABLE `shoppingcart_coupon` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `code` var... | sql | chosen |
[
{
"from": "system",
"value": "Add currency to donation metrics\n"
},
{
"from": "human",
"value": "-- Donations count\nINSERT INTO speakeasy_petition_metrics (campaign_id, activity, npeople)\n SELECT\n campaign_id, 'donation', count(id) donations_count\n FROM civicrm_contribution\n WHERE co... | sql | chosen |
[
{
"from": "system",
"value": "Add support for existing \"articles\"\n\nMapping these to page"
},
{
"from": "human",
"value": "SELECT\nFilePath = SUBSTRING(CONVERT(VARCHAR, DATEADD(hh, blog.TimeZoneOffset, c.DatePublishedUtc), 120), 1, 10) + '-' + c.EntryName + '.aspx.markdown',\nContent = \n'---... | sql | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.