Deploy from Lumerel
This commit is contained in:
61
migrations/001_create_training_items_table.php
Normal file
61
migrations/001_create_training_items_table.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
$pdo->exec("
|
||||
CREATE TABLE IF NOT EXISTS training_items (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
title VARCHAR(255) NOT NULL,
|
||||
description TEXT NULL,
|
||||
sort_order INT NOT NULL DEFAULT 0,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
)
|
||||
");
|
||||
|
||||
// Seed default items if table is empty
|
||||
$count = $pdo->query("SELECT COUNT(*) FROM training_items")->fetchColumn();
|
||||
if ($count == 0) {
|
||||
$items = [
|
||||
[
|
||||
'Minute 0–3: Calm training',
|
||||
"Sit down somewhere boring.\n\n
|
||||
• Ignore her completely\n
|
||||
• The second she settles even a little (lays down, sighs, pauses) → quietly say “yes” and give a treat\n
|
||||
• No excitement, no talking\n\n
|
||||
Goal: teach her that calm = reward",
|
||||
1
|
||||
],
|
||||
[
|
||||
'Minute 3–6: Leash pressure game',
|
||||
"Inside the house.\n\n
|
||||
• Put leash on\n
|
||||
• Apply gentle pressure (not a yank, just steady)\n
|
||||
• The moment she moves toward you → “yes” + treat\n\n
|
||||
Goal: pressure means move back, not fight it",
|
||||
2
|
||||
],
|
||||
[
|
||||
'Minute 6–8: Micro walk practice',
|
||||
"Inside or just outside your door.\n\n
|
||||
• Take a few steps\n
|
||||
• If leash tightens → stop immediately\n
|
||||
• When she gives slack → move again\n\n
|
||||
This is practice, not exercise",
|
||||
3
|
||||
],
|
||||
[
|
||||
'Minute 8–10: Separation practice',
|
||||
"Step away briefly.\n\n
|
||||
• Step out of sight\n
|
||||
• Count to 3\n
|
||||
• Come back before she reacts\n
|
||||
• Stay calm, no excitement when returning\n\n
|
||||
Repeat 5–10 times\n\n
|
||||
Goal: leaving and returning is no big deal",
|
||||
4
|
||||
],
|
||||
];
|
||||
|
||||
$stmt = $pdo->prepare("INSERT INTO training_items (title, description, sort_order) VALUES (?, ?, ?)");
|
||||
foreach ($items as $item) {
|
||||
$stmt->execute($item);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user