Skip to content

Commit

Permalink
added test to answer discussion #53
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl Sverre committed Jan 25, 2023
1 parent 421a569 commit e6fd63b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SingleStore Driver for Laravel <!-- omit in toc -->

[![Latest Stable Version](http://poser.pugx.org/singlestoredb/singlestoredb-laravel/v)](https://packagist.org/packages/singlestoredb/singlestoredb-laravel) [![Total Downloads](http://poser.pugx.org/singlestoredb/singlestoredb-laravel/downloads)](https://packagist.org/packages/singlestoredb/singlestoredb-laravel) [![License](http://poser.pugx.org/singlestoredb/singlestoredb-laravel/license)](https://packagist.org/packages/singlestoredb/singlestoredb-laravel) [![PHP Version Require](http://poser.pugx.org/singlestoredb/singlestoredb-laravel/require/php)](https://packagist.org/packages/singlestoredb/singlestoredb-laravel) [![Github Actions status image](https://github.com/singlestore-labs/singlestoredb-laravel-driver/actions/workflows/tests.yml/badge.svg)](https://github.com/singlestore-labs/singlestoredb-laravel-driver/actions)
[![Latest Stable Version](https://poser.pugx.org/singlestoredb/singlestoredb-laravel/v)](https://packagist.org/packages/singlestoredb/singlestoredb-laravel) [![Total Downloads](https://poser.pugx.org/singlestoredb/singlestoredb-laravel/downloads)](https://packagist.org/packages/singlestoredb/singlestoredb-laravel) [![License](https://poser.pugx.org/singlestoredb/singlestoredb-laravel/license)](https://packagist.org/packages/singlestoredb/singlestoredb-laravel) [![PHP Version Require](https://poser.pugx.org/singlestoredb/singlestoredb-laravel/require/php)](https://packagist.org/packages/singlestoredb/singlestoredb-laravel) [![Github Actions status image](https://github.com/singlestore-labs/singlestoredb-laravel-driver/actions/workflows/tests.yml/badge.svg)](https://github.com/singlestore-labs/singlestoredb-laravel-driver/actions)

This repository contains the official SingleStoreDB Driver for Laravel. This driver wraps the official MySQL support in Laravel in order to make it work nicer with SingleStoreDB. Specifically, this driver provides the following advantages over vanilla Laravel MySQL support:

Expand Down Expand Up @@ -30,7 +30,7 @@ This repository contains the official SingleStoreDB Driver for Laravel. This dri
- [Series Timestamps](#series-timestamps)
- [Computed Columns](#computed-columns)
- [Increment Columns without Primary Key](#increment-columns-without-primary-key)
- [Full-text search](#full-text-search-using-fulltext-indexes)
- [Full-text search using FULLTEXT indexes](#full-text-search-using-fulltext-indexes)
- [Testing](#testing)
- [License](#license)
- [Resources](#resources)
Expand Down
19 changes: 19 additions & 0 deletions tests/Hybrid/CreateTable/MiscCreateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,23 @@ public function medium_integer_id()
'create table `test` (`id` mediumint unsigned not null auto_increment primary key)'
);
}

/** @test */
public function discussion_53()
{
$blueprint = $this->createTable(function (Blueprint $table) {
$table->bigIncrements('id')->withoutPrimaryKey()->index();
$table->unsignedBigInteger('user_id')->shardKey();
$table->string('template_id');
$table->longText('data');
$table->string('response_status_code');
$table->longText('response_message');
$table->timestamps();
});

$this->assertCreateStatement(
$blueprint,
'create table `test` (`id` bigint unsigned not null auto_increment, `user_id` bigint unsigned not null, `template_id` varchar(255) not null, `data` longtext not null, `response_status_code` varchar(255) not null, `response_message` longtext not null, `created_at` timestamp null, `updated_at` timestamp null, index `test_id_index`(`id`), shard key(`user_id`))'
);
}
}

0 comments on commit e6fd63b

Please sign in to comment.