Closed cln-io closed 1 year ago
The string method in Laravel's migration builder is not limited to 255 characters by default.
I just tested this and you're right, it seems that MySQL limits these fields for some reason while SQLite doesn't.
Something like this might work, I'm not sure: $table->string('littlelink_description', 1000)->nullable();
@cln-io
I wrote this code to convert an existing database:
<?php
// Connect to the database
$servername = env('DB_HOST');
$username = env('DB_USERNAME');
$password = env('DB_PASSWORD');
$dbname = env('DB_DATABASE');
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Modify the column
$sql = "ALTER TABLE users MODIFY littlelink_description VARCHAR(1000)";
if (mysqli_query($conn, $sql)) {
echo "Column modified successfully";
} else {
echo "Error modifying column: " . mysqli_error($conn);
}
// Close the connection
mysqli_close($conn);
?>
I think using Laravel, this would be something like:
Schema::table('users', function (Blueprint $table) {
$table->string('littlelink_description', 1000)->change();
});
LittleLink Custom v3.3.6, set up on MySQL
I think there is a need to update some database fields either in length or in type,
In the profile, the input/text is limited to 255
the same for paragraphs as a link, its limited to 255 characters
users > littlelink_description
change from VARCHAR(255) to TEXT to allow more text than 255 characters.links > title
change from VARCHAR(255) to TEXT to allow more text than 255 characters.I've looked for the database creation queries within the source, and was hoping to make a PR for it, but was somehow unable to locate where those SQL queries are located 🤦🏻♀️